IF and VLOOKUP formula for different sheets

artemisa34

New Member
Joined
Jun 28, 2018
Messages
7
Hi all,

I am trying to search a number along four sheets. The formula I am using is this one:

=IF(VLOOKUP(M2;'ETL SMS'!N:N;1;FALSE)=Casos!M2;Casos!M2;VLOOKUP(Casos!M2;'ETL UMS'!N:N;1;FALSE)=Casos!M2;VLOOKUP(M2;'ETL FXS'!N:N;1;FALSE)=Casos!M2;VLOOKUP(M2;'ETL OIS'!O:O;1;0))

Where 'Casos' is the sheet containing the number I have to match, and "ETL SMS", "ETL UMS", "ETLS FXS" and "ETL OIS" the sheets where this number can be found.

Am I using the wrong formula (which is my guess) or is there any error on it that I have missed?

Thanks a lot for the help:)
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
TRY THIS OUT

=IF(VLOOKUP(Casos!M2,'ETL SMS'!N:N,1,FALSE)=Casos!M2,Casos!M2,IF(VLOOKUP(Casos!M2,'ETL UMS'!N:N,1,FALSE)=Casos!M2,Casos!M2,IF(VLOOKUP(Casos!M2,'ETL FXS'!N:N,1,FALSE)=Casos!M2,Casos!M2,IF(VLOOKUP(Casos!M2,'ETL OIS'!O:O,1,0)=Casos!M2,Casos!M2,""))))
 
Upvote 0
Thanks Nine Zero. Weirdly, it does work for some numbers but does not found others (and when checking in the ETL sheets, the number is there).

Do you know why is this happening??
 
Upvote 0
It could be a formatting issue with your values try checking that, or maye the column you are referencing check that as well , i dont see any other reason
 
Upvote 0
I found what the problem is: the formula only returns the values found in the first sheet that it looks up, in this case 'ETL SMS'. So if I insert this formula:

=IF(VLOOKUP(Casos!M2,'ETL OIS'!N:N,1,FALSE)=Casos!M2,Casos!M2,IF(VLOOKUP(Casos!M2,'ETL UMS'!N:N,1,FALSE)=Casos!M2,Casos!M2,IF(VLOOKUP(Casos!M2,'ETL FXS'!N:N,1,FALSE)=Casos!M2,Casos!M2,IF(VLOOKUP(Casos!M2,'ETL SMS'!O:O,1,0)=Casos!M2,Casos!M2,""))))

It will only return values found in 'ETLS OIS', and the rest as #N/A.
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top