# Less cumbersome multiple lookup

#### drluke

##### Active Member
Based on the data I have in col B, I am attempting to insert a code in col A. Any one of 4 different data items could be in col B.

Is there a formula that is less cumbersome than IF B=Water then A=Bottle or IF B=DAY then A=NIGHT etc... Any advise greatly appreciated!!

 COL A COL B Formula = Bottle or Night Could be any of Water or Day

<tbody>
</tbody>

### Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

#### becci.gott

##### Board Regular
Is this what you have at the moment?
=IF(B1="Water","Bottle",IF(B1="Day","Night"))

Would it be better to use a VLOOKUP?

Last edited:

#### Joe4

You can also use a LOOKUP function:
Code:
``=LOOKUP(B1,{[COLOR=#ff0000]"Day","Water"[/COLOR];"Night","Bottle"})``
Add you can keep adding to that (you said that you have four possible values).
Just note that the values in red (the values you are matching on) must be in alphabetical order.
For more on the LOOKUP function, see: https://www.techonthenet.com/excel/formulas/lookup.php

Last edited:

Replies
1
Views
89
Replies
7
Views
512
Replies
2
Views
271
Replies
2
Views
52
Replies
1
Views
110