Using CONCATENATE in a MATCH Function - arrays

So I'm creating a Hyperlink that will go to a specific Tab. There are multiple tabs.
=HYPERLINK(CONCATENATE("#","'",G3,"'","!E")&MATCH(E3,CONCATENATE("'",G3,"'","!E:E"), FALSE),"GO")
The first CONCATENATE works, but the 2nd one in the MATCH function returns "'G3'!E:E" and results in a #VALUE! error.
The reason I need it to go to G3 is that's the Tab Name I want it to go to. Different lines will go to different tabs and I'm trying to make it automatically populate with the Tab Name.
Help! And Thanks in Advance!
~Michelle

Though HyperLink accepts a string, MATCH does not. So you need to use INDIRECT in the MATCH to turn the string into a viable range reference:
=HYPERLINK(CONCATENATE("#","'",G3,"'","!E")&MATCH(E3,INDIRECT(CONCATENATE("'",G3,"'","!E:E")), 0),"GO")

Related

LogicApp Split and Replace having problems with \n

I have been trying to split a string into an array of each line \n
As this doesn't work I tried replacing replace(outputs('Compose_6'),'\r\n','#') with a view to then splitting on #.
I have searched the internet and tried various things but nothing seems to work.
Can someone explain how to do this?
Thanks in advance
Using split(variables('string var'),'\n') expression, you can split string into array. By default logic app will add an extra black slash to original back slash. So suggesting you to change expression in code view as mentioned above.
I have created logic app as shown below,
In first initialize variable action, taken a string variable with text as shown below
Hello
Test split functionality
Using logic apps
Next initialize variable action, using a array variable and assigning value using expression as split(variables('string var'),'\n'). Make sure you dont have double back slash added in code view. Only one back slash should be there when you see it in code view.
Code view:
The output of logic app can be shown below,
Refer this SO thread.

How to make Vlookup ignore blank cells while still checking to see if the ones with a value inside are correct

I am currently making a tardy counter system for my principal as of right now I am having issues with trying to make it so that whenever a new entry is put into the Datasheet it references to the ID sheet and checks to see if it's correct and if it is the cell next to it is blank if it is incorrect it should say error but every time when I try =IF(A2:A="","",ARRAYFORMULA(if(VLOOKUP(A2:A, ID!A1:A,1,FALSE)=A2:A, "", "error")))
it correctly checks but if any are wrong it outputs N/A I'm fine with that on the ones with a value in it but I need to get rid of the "N/A" corresponding to the blank cells
in summary, I need it to count the values that don't match the ID sheet as wrong rather than the blank cells as wrong
I tried multiple if functions but had no good results
also here is a copy
try:
=ARRAYFORMULA(IF(A2:A="","",IFNA(IF(VLOOKUP(A2:A,ID!A:A,1,)=A2:A,),"error")))
Have you tried the ISBLANK() function. Ex. IF(ISBLANK($A2),...
I got this working in google sheets, try it out:
=IF(isblank($A2),"", IF(IFERROR(VLOOKUP($A2, ID!A:A,1,FALSE)=$A2), "", "error"))

Is there a way to use the data-splitting function for different types of separators at the same time?

Working with a data sheet with phylogenetic data. Trying to separate information out of it. Problem is it's all in one cell and for me to manually double click, highlight part of the cell I need, copy, double click my spreadsheet, and paste into it would be really painful. Trying to separate to columns so I can just copy/paste from one spreadsheet to another.
So it'll look like this in one cell:
cervical vertebrae, postzygapophysis, contact anteriorly: absent(0); present but looks weird (1)
I want it to look like, in one row:
cervical vertebrae | postzygapophysis | contact anteriorly | absent(0) | present but looks weird(1)
If you look at HELP or the pop-up when you enter the Split function in sheets, you will see that [split_by_each] is an option. When set to TRUE it will split by each character in the delimiter argument.
So, in your case:
=split(A1,",:;",true,true)
What you are looking for in Googlesheet is split:
Basically, for a single separator, you can simply do:
=split(Cell,",")
But for multiple separators like yours, put all the separator together:
=split(Cell,"separators")
For example, say in Cell A1 you put your dirty string there,
cervical vertebrae, postzygapophysis, contact anteriorly: absent(0); present but looks weird (1);
In cell B2, or any other cell, you can type: =split(Cell,",;:")
If you need to trim out white spaces if present, then you can use this instead:
=ArrayFormula(trim(split(A1,",;:")))
for one row (as mentioned):
=SPLIT(A1; ",;:")
for array use:
=ARRAYFORMULA(IFERROR(SPLIT(A1:A; ",;:")))

How to iterate over elements in selenium

Actually i want to read emails one by one in junk folder of "outlook:live" and mark emails "Not spam".
emails = WebDriverWait(driver, 5).until(EC.element_to_be_clickable((By.XPATH,"//div[#class = 'xoCOIP8PzdTVy0T6q_uG6']")))
This xpath matches 400 instances. I want to make a loop to select one email at a time like select first email, click on the div and perform action and then 2nd email and so on. I'm trying this
emails = WebDriverWait(driver,
5).until(EC.element_to_be_clickable((By.XPATH,"//div[#class =
'xoCOIP8PzdTVy0T6q_uG6']")))
for count in range(0,len(emails)):
(emails)[count+1].click()
Please help me know where im doing wrong. Thanks in advance
It appears that the function you're using to return the clickable elements is only returning a single element, so you'll have to use a different function, make a change in your logic, etc.
For instance, you could use Selenium's find_elements_by_xpath("//div[#class = 'xoCOIP8PzdTVy0T6q_uG6']") which will return a list of WebElement object(s) if the element(s) are found, or an empty list if the element(s) is not found. This will, of course, not take into consideration the possibility of the elements not being completely loaded on the page. In my experience, just slapping a time.sleep(10) after you open the page is "'good enough".
I recommend making sure your elements can be discovered and interacted with first to make sure this isn't all in vain, if you haven't already.
Another option is to add another function, something like a elements_to_be_clickable() function, to the Expected Conditions source code.
From the Expected Condition documentation, I've done some research and it looks like the element_to_be_clickable() function only returns a single element. Moreover, from the source code, said function mainly makes use of the visibility_of_element_located() function. I believe you could follow similar logic to the element_to_be_clickable() function, but instead use the visibility_of_all_elements_located() function, in order to return multiple WebElements (since visibiilty_of_all_elements_located() returns a list of WebElements).

macro for automatic refresh function on array

I am creating a dynamic reporting tool that creates reports from data sourced from Wonderware. The data that is sourced is gathered from various pumps/flows/temps around site for operators/management to use. I want to create a dynamic sheet rather than use the wizards available because of limited IT experience of some of the operators.
I have managed to create the report but have one issue that i cannot resolve that would help the sheet become more user friendly.
I have some array formulas that link to cells that have dropdowns. (This is what helps make it user friendly). The drop down cells include, which server to look at, which tagname to look for, the start time, the duration and the number of cells in the array.
When changing the number of cells in the array cell dropdown the array doesnt change until you select a cell in within the array and then select the Refresh Function command. This then changes the array.
I want to write a macro that will select several cells on the sheet that have individual arrays and select Refresh Function command. I will then assign this to a shape that can quickly and easily be selected.
Can anyone help with this macro please?
You just need to add the reference to ActiveFactoryWorkbook in visual basic editor, and then something like this:
Range("B11").Activate
ActiveFactoryWorkbook.wwRefreshFunction
Be sure that in the cell B11 you will have a part of the array the query generates. As you have to refresh more than one array just copy the code again and change the cell reference.
Sub Workbook_RefreshAll()
ActiveWorkbook.RefreshAll
End Sub

Resources