Can you combine if and vlookups?

L

Lainyb

I wanted to know if anyone could help me.

I have a spreadsheet and want to do some lookups.

I need the formula to look at a cell in main spreadsheet and if the cell is
35 return the 1st lookup and if the cell is 37 then return the second lookup
(c2,salary,3,false) or (c2,salary,4,false) basically I am trying get
spreadsheet to bring in one salary if the person works 35hrs and a different
salary if the person works 37 hours.

Any help would be grateful - I have been struggling with this for ages.

Thanks
 
B

Brad

Yes, you can.

You could also have a lookup inside a lookup

But if you only have two options 35 or 37 and this value is stored in cell b3
(c2,salary,3+(b3=37),false).

if b3 doesn't equal 37 the answer is three, if b3 equals 37 the answer is four
 
T

T. Valko

One way...

Assuming the lookup value can only be either 35 or 37.

=VLOOKUP(C2,Salary,3+(C2=37),0)
 
L

Lainyb

Brad

Sorry I don't think I explained this very well and also couldn't find this
original post so I have reposted with more information. Thanks for help so
far.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top