ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   VLOOKUP error (https://www.excelbanter.com/excel-discussion-misc-queries/45866-vlookup-error.html)

Eintsein_mc2

VLOOKUP error
 
Hi I keep getting an error when I try and put in the last vlookup into
the formula.
=IF(B21="RG",VLOOKUP(A21,'Codes
All'!$A$4:$Q$80,4,FALSE),IF(B21="RC",VLOOKUP(A21,' Codes
All'!$A$4:$Q$80,5,FALSE),IF(B21="TG",VLOOKUP(A21,' Codes
All'!$A$4:$Q$80,8,FALSE),IF(B21="TC",VLOOKUP(A21,' Codes
All'!$A$4:$Q$80,9,FALSE),IF(B21="BG",VLOOKUP(A21,' Codes
All'!$A$4:$Q$80,12,FALSE),IF(B21="BC",VLOOKUP(A21, 'Codes
All'!$A$4:$Q$80,13,FALSE),IF(B21="AG",VLOOKUP(A21, 'Codes
All'!$A$4:$Q$80,16,FALSE),IF(B21="AC",VLOOKUP(A21, 'Codes
All'!$A$4:$Q$80,17,FALSE),"")))))
I think that this formula could be condenced if I only new how to do
it. If any one can help it would be great.


Biff

Hi!

Create a table somewhere, say, A1:B8

RG.......... 4
RC.......... 5
TG.......... 8
TC.......... 9
BG.......... 12
BC.......... 13
AG.......... 16
AC.......... 17

=IF(B21="","",VLOOKUP(A21,'Codes All'!$A$4:$Q$80,VLOOKUP(B21,A1:B8,2,0),0))

Biff

"Eintsein_mc2" wrote in message
oups.com...
Hi I keep getting an error when I try and put in the last vlookup into
the formula.
=IF(B21="RG",VLOOKUP(A21,'Codes
All'!$A$4:$Q$80,4,FALSE),IF(B21="RC",VLOOKUP(A21,' Codes
All'!$A$4:$Q$80,5,FALSE),IF(B21="TG",VLOOKUP(A21,' Codes
All'!$A$4:$Q$80,8,FALSE),IF(B21="TC",VLOOKUP(A21,' Codes
All'!$A$4:$Q$80,9,FALSE),IF(B21="BG",VLOOKUP(A21,' Codes
All'!$A$4:$Q$80,12,FALSE),IF(B21="BC",VLOOKUP(A21, 'Codes
All'!$A$4:$Q$80,13,FALSE),IF(B21="AG",VLOOKUP(A21, 'Codes
All'!$A$4:$Q$80,16,FALSE),IF(B21="AC",VLOOKUP(A21, 'Codes
All'!$A$4:$Q$80,17,FALSE),"")))))
I think that this formula could be condenced if I only new how to do
it. If any one can help it would be great.




Eintsein_mc2

Thanks a million. works perfect



All times are GMT +1. The time now is 08:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com