I have a VLOOKUP formula to lookup from a different sheet as below:
=ARRAYFORMULA(IFERROR(VLOOKUP(B2:B6,Sheet3!A2:C,2,0)))
I would now like to expand the data on Sheet 3 but would like the next batch of data to be in range E2:G. Is it possible to have a VLOOKUP across 2 different ranges like this?
I've done lots of google searching without any joy tonight so thought I'd ask the question on here to make sure I'm not trying the impossible.
try:
=ARRAYFORMULA(IFNA(VLOOKUP(B2:B6, {Sheet3!A2:C; Sheet3!E2:G}, 2, 0)))
Related
Using Google Sheets. I'm trying to pull information to another sheet if certain criteria exists (equals 1, 2, etc.). The filter I'm trying to use is:
=filter({TestData!A5:I30,TestData!B5:B30=2},{TestData!K5:S30,TestData!L5:L30=2})
Is it possible to filter data across multiple locations with one formula this way?
Google Sheets gives me a formula parse error.
use the QUERY formula, like this:
=QUERY({TestData!A5:I30; TestData!K5:S30}, "SELECT * where Col2=2")
I'm trying to use arrayformula to expand the formula below but it's not working. When I copy-paste manually the formula into each cell it works.
=arrayformula(INDEX($1:$100,ROW(B2:B),match(YEAR(M$1:$1),$1:$1,0)))
What I want to achieve is to convert yearly salaries into monthly salaries based on years.
The spreadsheet can be viewed here:
https://docs.google.com/spreadsheets/d/1veiYh1CMIfFPwBGQk4OwKmCLa7q08TugReVfAXtpIgI/edit#gid=1363287956
Thanks!
Solution:
Since you are looking for a specific column, you can use HLOOKUP as a substitute for INDEX and MATCH:
=ARRAYFORMULA(HLOOKUP(YEAR(M1:AT1),A1:H11,ROW(B2:B11))/12)
This should yield the same result as the previous formula:
I want to Use ArrayFormula for JoinText for multiple columns which have their own ArrayFormulas in Google Sheets.
My formula works for columns that have plain text values but for some reason Google Sheets gives me an error when I apply it to columns that have their own ArrayFormulas applied to them.
Take a look at the example sheet I've created HERE
Any help will be appreciated!
I hope this solution with query is helpful for you:
=ArrayFormula(transpose(query(transpose(C1:D),,2)))
(Will work faster if you know the limit of the range, e.g. C1:D10).
For implementing commas between the columns you can use
=ARRAYFORMULA(IF(C1:C="",D1:D,if(D1:D="",C1:C,C1:C&", "&INDIRECT("D1:D"))))
I put this formula in cell I2 on your sample sheet. It should be relatively fast for many thousands of rows.
=ARRAYFORMULA(SUBSTITUTE(TRIM(C2:C&CHAR(10)&D2:D),CHAR(10),", "))
I am trying to use a variation of a countif formula across two sheets. I want to count the number of times an agent of mine is a "Yes" in column A based on how many times their name appears in column A. BUt I want to pull this information from one google sheet to a completely different sheet in another doc.
COUNTIF paired with IMPORTRANGE
It should be giving me a count of 3, but I am getting 0.
first you need to run your IMPORTRANGE formula alone and Allow access. then when sheets are connected you just do:
=COUNTIF(IMPORTRANGE("ID-or-URL", "Sheet1!A1:A"), "yes")
I've been using Arrayformula to auto-expand formulas (such as "=Left(A2:A,B2:B-1") downward, but I need some help understanding this formula. I've read up on the function itself and browsed many forums about this but I can only find articles explaining how to use this with simple formulas, so I'm going to try to as this as simply as possible here: Is it possible to use Arrayformula to expand formulas downward when the formula uses arrays?
The summary for Arrayformula reads "Enables the display of values returned from an array formula into multiple rows and/or columns and the use of non-array functions with arrays." This was my understanding of how Arrayformula populated a formula into rows automatically. Using this I thought of it as writing a formula that generated an array of formulas, and then splitting them up with Arrayformula. This seems to not work with some formulas such as concatenate, which I will focus my question on. This example is far from my real life problem, but if someone could show me a solution I can apply it elsewhere.
Arrayformula spreadsheet example
Usually when I use Arrayformula with A1:A it would expand the formula through the column, referencing the corresponding rows as it went. With this example I want to have Column C be the concatenated result of columns A and B. Is this possible with Arrayformula? This question is not specific to concatenate, that is just the simplest one that came to mind. Another example would be Countif. Lets say I want to see how many values in the first 5 columns are over 20, and I want that formula to auto populate down, is that possible and if so how would it be done?
Arrayformula second example
P.S. Please don't say copy the formula using the drag handle in the lower right.