How to change the next-in-line cell according to previous cell in google sheets? - google-sheets

In the A column, there's "A" in A1, "B" in A2, "C" in A3, "D" in A4 and "E" in A5.
In the B column, there's "F" in B1, "G" in B2, "H" in B3, "I" in B4 and "J" in B5.
In D1, I have a dropdown of A1:A5.
Like this:
I wish that E1 would show the matching B cell to the dropdown in D1.
So, for instance, if I put "A" in the dropdown, E1 would show "F", or if I put "C" in the dropdown, E1 would show "H".
Do anyone knows if this is possible in Google Sheets? If so, how?
I'm not familiar with Google Sheets or any excels-like programm, so I don't even know how to try anything, honestly.

You could use VLOOKUP. It looks in the first column of the range and returns the value in the second one:
=VLOOKUP(D1,A:B,2,0)

Related

Google Sheet REGEXMATCH with range

I want to search specific text in an entire column, the text to be searched is in another column. I am using below formula:
=ARRAYFORMULA(if(isblank(A2:A),"",IFERROR(if(REGEXMATCH(UPPER(A2:A), B2:B4),"Yes","No"),"Not Found")))
This function is comparing cell A2 with B2, A3 with B3 and so on.... I want to compare A2 with B2:B4, A3 with B2:B3...
Below is the sheet link:
https://docs.google.com/spreadsheets/d/164kxDO9aWZzr5qXjvtRlk_tiRoKU1W7Xc-Ig9VH8qzE/edit#gid=495498161
Any help on above will be greatly appreciated....
Change your formula to
=ARRAYFORMULA(if(isblank(A2:A),"",IFERROR(if(REGEXMATCH(UPPER(A2:A), TEXTJOIN("|", 1, B2:B4)),"Yes","No"),"Not Found")))
Or, in case you want an exact match:
=ARRAYFORMULA(if(isblank(A2:A),"",IFERROR(if(REGEXMATCH(UPPER(A2:A), ".*"&TEXTJOIN("|", 1, B2:B4)&".*"),"Yes","No"),"Not Found")))
Also see the duplicated sheet in the spreadsheet you shared.
See if that works?

Google Sheets Formula Suggestion

So I have the following case.
I have a list in column A and their values in B.
I have a list in column E and their values in F.
The values of B should come from the data from F.
1)If value from A, lets's say A1, is not equal [case insensitive] to any value from the range from E1:E9999, then the B1 value should be nothing.
2) If value from A, lets's say A2, is equal [case insensitive] to a value from the E column, and that value is E4854, then B2 should be copied from F4854.
Kind Regards
=ARRAYFORMULA(IFERROR(VLOOKUP(A1:A, E:F, 2, 0)))

Is it possible to expand data in excel/googlesheets?

Here's an simplified example of what I am trying to do.
cat 2
dog 3
Translated to:
cat
cat
dog
dog
dog
Is that possible with just a function in a cell or do I have to use something like a macro? How would I do that?
In Google sheets, assuming dog and cat are in A1 and A2 and 2 and 3 are in B1 and B2, this will do it:
=transpose(split(rept(A1&" ",B1)&rept(A2&" ",B2)," "))
In Google sheets, assuming "dog 2" and "cat 3" are in A1 and A2, this will do it:
=transpose(QUERY({(split(rept(split(A1," ")&" ",query(split(A1," "), "SELECT Col2"))," ")),(split(rept(split(A2," ")&" ",query(split(A2," "), "SELECT Col2"))," "))},,))
Credit:
G4mo in StackOverflow How to make a range repeat n-times in Google SpreadSheet
In Excel, you can use either VLOOKUP() or a combination of INDEX() and MATCH().
With data in cols A and B, in C1 enter 1 and in C2 enter:
=C1+B1
and copy downward. In D1 enter:
=IF(ROWS($1:1)>SUM(B:B),"",INDEX(A:A,MATCH(ROWS($1:1),C:C,1)))
and copy downwards:
The helper column D translates the repetition factor in column B into match index.
(Placing a helper column to the left of the data would allow the use of VLOOKUP())

Return a formula value to a cell and add to existing data in google sheets

In Google-Spreadsheet I have the below setup
B3 is set up using "Custom Formatting" : ##"°F/"##"°C"
B2 contains the formula: =ROUND(CONVERT(B3, "F", "C"))
B3=90
B2=32
What I desire to happen:
Input 90 into B3 resulting in Output B3 "90°F/32°C"; and, no visible output in B2.
I'm thinking to =CONCATENATE(B3,B2) but, I get infinite loop error.
I would then like to repeat the formula in B2 for B4, B5, B6, etc.
B3: 90
C3: =IF(B3,CONVERT(B3, "F", "C"),)
Format B3: 0.0"°F"
Format C3: 0.0"°C";"-"0.0"°C"
Copy formula to other cells using "click & drag" method

Spreadsheet Sorting Function

I want to only grab certain values from a column and put them in another column. Here is a graphic of what we would want the output to be. I am using Google Sheets.
Example of what I am trying to do:
Help of any kind would be appreciated
This is achieved with the filter formula. If in D2 you have
=filter(B2:B, A2:A = "A")
that column will contain the entries from column B where the corresponding column A entry is "A". Similarly for others.
Use query. In D2, E2, F2 put:
=query(A2:B,"select B where B contains 'A'")
=query(A2:B,"select B where B contains 'B'")
=query(A2:B,"select B where B contains 'C'")

Resources