Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 231
Default If & Vlookup statement

I am trying to lookup 2 separate ranges based on the IF statement.

For example If B3="PWR-PHYS" then I need it to lookup(A3,'DatePivot'!A1:B20,2)
But if B3 does not = "PWR-PHYS", then i need it to
lookup(A3,'Location'!A1:B20,2)

So whether it equals pwr-phys or doesnt, I need a value returned from
separate locations. Please advise how I can do this
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default If & Vlookup statement

Sarah wrote:
I am trying to lookup 2 separate ranges based on the IF statement.

For example If B3="PWR-PHYS" then I need it to lookup(A3,'DatePivot'!A1:B20,2)
But if B3 does not = "PWR-PHYS", then i need it to
lookup(A3,'Location'!A1:B20,2)

So whether it equals pwr-phys or doesnt, I need a value returned from
separate locations. Please advise how I can do this



=VLOOKUP(A3,IF(B3="PWR-PHYS",'DatePivot'!A1:B20,'Location'!A1:B20),2)
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 126
Default If & Vlookup statement

=if(B3="PWR-PHYS",lookup(A3,'DatePivot'!A1:B20,2),lookup(A3,'L ocation'!A1:B20,2))
--
Hope this helps.
If it does, please click the Yes button.
Thanks in advance for your feedback.
Gary Brown



"Sarah" wrote:

I am trying to lookup 2 separate ranges based on the IF statement.

For example If B3="PWR-PHYS" then I need it to lookup(A3,'DatePivot'!A1:B20,2)
But if B3 does not = "PWR-PHYS", then i need it to
lookup(A3,'Location'!A1:B20,2)

So whether it equals pwr-phys or doesnt, I need a value returned from
separate locations. Please advise how I can do this

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 88
Default If & Vlookup statement

Try this and click yes if this works.

=IF(B3="PWR-PHYS",Vlookup(A3,'DatePivot'!A1:B20,2),vlookup(A3, 'Location'!A1:B20,2))


"Glenn" wrote:

Sarah wrote:
I am trying to lookup 2 separate ranges based on the IF statement.

For example If B3="PWR-PHYS" then I need it to lookup(A3,'DatePivot'!A1:B20,2)
But if B3 does not = "PWR-PHYS", then i need it to
lookup(A3,'Location'!A1:B20,2)

So whether it equals pwr-phys or doesnt, I need a value returned from
separate locations. Please advise how I can do this



=VLOOKUP(A3,IF(B3="PWR-PHYS",'DatePivot'!A1:B20,'Location'!A1:B20),2)
.

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
Vlookup, if statement, maybe an and statement Jennifer Excel Discussion (Misc queries) 1 February 26th 10 03:30 AM
Help with If and Vlookup Statement JessM Excel Worksheet Functions 1 February 10th 09 09:54 PM
Vlookup or IF statement GuinnessT Excel Worksheet Functions 5 August 21st 08 09:27 PM
if then statement (i think) or vlookup Ann Excel Worksheet Functions 1 June 6th 08 12:51 AM
Vlookup or If statement Help JPriest Excel Worksheet Functions 7 June 28th 05 08:00 PM


All times are GMT +1. The time now is 12:59 AM.

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

About Us

"It's about Microsoft Excel"