I'm looking to create a formula that converts a column of strings (If a string is available) into a larger string. See the google spreadsheet example in the attached.
Is this possible? Please help me make a formula.
Column A to E is the input, Column H should contain the formula that displays the expected result.
https://docs.google.com/spreadsheets/d/1bOMkEgzhyoZHNv2Z9dCQ7qcDGb36CTN9fnMo9wJ7cqU/edit?usp=sharing
There's a new tab on your sheet with this formula in h1.
=ARRAYFORMULA({"Output";IF(A2:A="",,SUBSTITUTE(A2:A," ","_")&" = "&IF(B2:B="","['"&A2:A&"']","['"&TRANSPOSE(SUBSTITUTE(TRIM(QUERY(TRANSPOSE(A2:G&CHAR(10)),,7)),CHAR(10)&" ","', '"))&"']"))})
Does that work?
Related
I have a dropdown text column, Claims!B2:B that is supposed to match Ref!A2:A and select Ref!B2:B text.
I tried
=ArrayFormula(IF($B$2:$B="","", LOOKUP($B$2:$B,Ref!$A$2:$A,Ref!$B$2:$B)))
some results not consistent
=QUERY(Ref!A2:B,"Select B where A = "&B2:B&"")
resulting in error
=FILTER(Ref!B2:B,Ref!$A$2:$A=B2:B)
wrong results and not arrayed.
I like to know what should be the simplest array formula for the scenario and if possible correct my other trials for my learning process.
Sample data attached. sample supplier
Please use
for your Category column
=INDEX(IFNA(VLOOKUP(B2:B,Ref!A2:C,3,0)))
and for your GST Stats
=INDEX(IFNA(VLOOKUP(B2:B,Ref!A2:C,2,0)))
(As you notice the only difference is the column number from 2 to 3)
Functions used:
INDEX
IFNA
VLOOKUP
Working with the Base and Data tabs from this sheet: https://docs.google.com/spreadsheets/d/1OsSWQ_48VrcTU3pXGeJ_1syluKPVeVRune39UA9I3x4/edit?usp=sharing
Expected result is textjoin of all colors matching SKU separated by comma in column C on Base tab.
Expected result shows in Column D, done manually.
All formulas i've tried either put everything in one cell (C2), gives an N/A error(C4), just pulls the first result (C5) or it is just completely blank.
Please help? If you cannot, then thank you for reading anyway.
I did it on a new Sheet on the Spreadsheet that i took the liberty to create (hope it's ok)
For getting the colors I used QUERY: so it came out as QUERY(Data!B:G,"select G where B = '"&A2&"'". After that I just fed that to your JOINTEXT formula
I have 2 sheets in Google Sheet
https://docs.google.com/spreadsheets/d/1uqTUjoT978AyNU7TeBfVbcWDQ_aAamC7d51UB8gdLBk/edit?usp=sharing
I am trying to get "ranking" value from previous day ranking sheet.
Currently I am shucked with INDEX MATCH formula to get data from previous date sheet (20210810-0:7).
Please have a look at "20210811-0:6" sheet row 24, the formula I made returns N/A value
I tried VLOOKUP and combinations of INDEX MATCH formulas but all failed.
I checked the content D column with D column in another sheet, all values returned "TRUE"
Please tell me my mistakes. I tried many combinations of below formula.
=INDEX('20210810-0:7'!A4:A29,match(D24,'20210810-0:7'!A4:G29,0))
Yellow highlight is mistake formula
Green is how it should show.
=FILTER('20210810-0:7'!$A$4:$A$29,'20210810-0:7'!$D$4:$D$29 = D24)
Paste this in B24, I think this is what you are looking for.
I'm trying to get the below formula to copy down column D (in red) and have the same results as column E (in green)
={"Query in H1";ARRAYFORMULA(IF(B2:B<>"",(IF(ISNUMBER(SEARCH(B3:B,IMPORTXML(A2:A,"//h1"))),"Yes","No"))))}
This formula collects the H1 (xpath) via the IMPORTXML function of the URL (column A) and checks to see if the keyword (column B) is included. If it is "Yes" if not "No"
See Google Sheet for reference:
https://docs.google.com/spreadsheets/d/1iHkU-rNtNhoOKvW_CWY7WU5OLsMFVqEFNRZlx_R-7RY/edit#gid=1497887942
Your formula just needs a few modifications:
Remove the header text and modify the SEARCH parameters to B2:B such that the formula looks like this:
=ARRAYFORMULA(IF(B2:B<>"",(IF(ISNUMBER(SEARCH(B2:B,IMPORTXML(A2:A,"//h1"))),"Yes","No"))))
Place the formula in the D2 cell.
After all the changes, this is how your sheet will look like:
I have also taken the opportunity to create a copy of the sheet named Answer with all the modifications.
As far as I know, we can not use ImportXML with ArrayFormula, the result after run formular will not correct. Even you see the result run down from the top to the last column, but the result will be wrong.
You can see an example in the screenshot below, with the same URL, the results in Column F and I are different from each other.
I've been at this problem for a while now. I am trying to sum numbers under a specific column when the rows equal a certain text and then display that sum on a different sheet. So far I came up with this formula: =IF(EXACT(A2,Table!A2:A)=TRUE,SUM(Table!C2:C)); however the only problem is that is sums everything in column C (which makes sense).
I wish there was a way to do something like the following: SUM(Table!C2:C where EXACT(A2,TABLE!A2:A)=TRUE). I've also tried the SUMIF(), DSUM(), and QUERY() functions to no avail. I must be getting logically tripped up somewhere.
Figured it out: =SUM(FILTER(Table!E4:E, EXACT(Table!A4:A,A4)=TRUE)).
=sum ( FILTER (b1:b10, a1:a10 = "Text" ) )
// the above formula will help you to take the sum of the values in column B when another column A contain a specific text.
The formula is applicable only in Google Spreadsheets