Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default 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





  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 846
Default 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





  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default 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







  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default 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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IFs with VLOOKUPs Brad Autry Excel Worksheet Functions 5 August 4th 09 03:02 PM
How do I combine worksheets w/o enough rows to combine? Amanda W. Excel Worksheet Functions 3 June 9th 09 07:26 AM
Combine cells with the same reference and combine quantities brandon Excel Discussion (Misc queries) 2 September 17th 08 05:44 PM
2 VLookups Guitarbuyer Excel Worksheet Functions 1 August 4th 08 09:45 PM
Dependent vlookups - nested vlookups (maybe) Maniv Excel Worksheet Functions 1 April 22nd 08 07:40 PM


All times are GMT +1. The time now is 02:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"