1

I'm working with the following Google Sheet.

In the Filter Sheet I used the following FILTER() function to retrieve some data from the Data Sheet.

FILTER({Data!B12:H}, Data!B12:B<>"")

Using the above function I'd like to add a column to the end of the retrieved data containing a value (Lorem Ipsum) in cell A1 of the Data Sheet.

I have tried using the following filter function

FILTER({Data!B12:H,"" &INDEX(Data!A1)}, Data!B12:B<>"")

which yields the error

Function ARRAY_ROW parameter 2 has mismatched row size. Expected: 27. Actual: 1.

My expected output is: enter image description here

Please Advise

2 Answers 2

2

Try

=FILTER({Data!B12:H, IF(LEN(Data!B12:B), Data!A1,)}, Data!B12:B<>"")

and see if that works?

Sign up to request clarification or add additional context in comments.

3 Comments

Works Great! Would you mind explaining your answer a bit, so I can accept it
The {} creates an array with the data in B12:H and one extra column. That extra column is constructed with the formula IF(LEN(Data!B12:B), Data!A1,). It creates the value of Data!A1 for every row that has a value in Data!B12:B.
Similar but this is what worked for me =FILTER({'SHEET_NAME'!A2:E,IF(ROW('SHEET_NAME'!A2:A),"SHEET_NAME")},'SHEET_NAME'!A2:A<>"")
2

Try this in cell A5 on the filter sheet:

=arrayformula(FILTER({Data!B12:H,if(Data!B12:B<>"",Data!A1,)}, Data!B12:B<>""))

2 Comments

Works! but I have to use the value in cell A1
OK in that case, replace "Lorum Ipsum" with Data!A1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.