JBloggs
JBloggs

Reputation: 27

Do VLookup IF condition is met

I'm trying to get a VLookup to run on specific rows within my spreadsheet. The sheet is generated automatically, so manually entering the VLookup into specific rows is an issue because the ones I am needing change from time to time.

I have a test IF statement (shown below) that works perfectly fine.

=IF(LEFT(A3,6)="200301","Yes","No")

Here is my VLookup that works too.

=L4*IFERROR(VLOOKUP($I4,INDIRECT("data!weights"),2,FALSE),0)

I am trying to get the VLookup to run in the 'Value_If_True' section of the IF statement.

Thanks in advance

Upvotes: 0

Views: 157

Answers (1)

G42
G42

Reputation: 10019

If I understand your question, you literally have to put the 2nd formula in the "Yes" part of your 1st formula.

=IF(LEFT(A3,6)="200301",L4*IFERROR(VLOOKUP($I4,INDIRECT("data!weights"),2,FALSE),0),"No")

Upvotes: 1

Related Questions