ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Need help with vlookup. (https://www.excelbanter.com/excel-worksheet-functions/112659-need-help-vlookup.html)

AJL

Need help with vlookup.
 
I'm not sure if this is possible, but I have a column of data generated by a
series of exact match Vlookups. If one of the matches is not found it
returns a blank, so the column could look like
B
E
G
J

O
R
U

2

or possibly

B
D


M
Q
R
U

2

Depending on what the vlookup finds. My question is, how do I search this
column and return conditional values. For example, if I search the column
and both a B and D are present I'd like to return a 1. But if a B and E are
present, I'd like to return a 2. If B,E, and R are present I'd like to
return a 3 and so on. Any ideas?




Dave F

Need help with vlookup.
 
One awkward way would be to use COUNTIF:

=IF(AND(COUNTIF([range]="B")1,COUNTIF([range]="D")1),1,[etc....])

Dave
--
Brevity is the soul of wit.


"AJL" wrote:

I'm not sure if this is possible, but I have a column of data generated by a
series of exact match Vlookups. If one of the matches is not found it
returns a blank, so the column could look like
B
E
G
J

O
R
U

2

or possibly

B
D


M
Q
R
U

2

Depending on what the vlookup finds. My question is, how do I search this
column and return conditional values. For example, if I search the column
and both a B and D are present I'd like to return a 1. But if a B and E are
present, I'd like to return a 2. If B,E, and R are present I'd like to
return a 3 and so on. Any ideas?





All times are GMT +1. The time now is 03:23 PM.

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