![]() |
Can you combine if and vlookups?
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 |
Can you combine if and vlookups?
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 -- Wag more, bark less "Lainyb" wrote: 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 |
Can you combine if and vlookups?
One way...
Assuming the lookup value can only be either 35 or 37. =VLOOKUP(C2,Salary,3+(C2=37),0) -- Biff Microsoft Excel MVP "Lainyb" wrote in message ... 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 |
Can you combine if and vlookups?
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 -- Lainyb "Brad" wrote: 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 -- Wag more, bark less "Lainyb" wrote: 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 |
All times are GMT +1. The time now is 07:31 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com