A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

If & Vlookup statement



 
 
Thread Tools Display Modes
  #1  
Old April 13th, 2010, 05:17 PM posted to microsoft.public.excel.worksheet.functions
sarah
external usenet poster
 
Posts: 633
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  
Old April 13th, 2010, 05:23 PM posted to microsoft.public.excel.worksheet.functions
Glenn[_6_]
external usenet poster
 
Posts: 1,245
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  
Old April 13th, 2010, 05:38 PM posted to microsoft.public.excel.worksheet.functions
Gary Brown[_6_]
external usenet poster
 
Posts: 61
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  
Old April 16th, 2010, 08:13 PM posted to microsoft.public.excel.worksheet.functions
Mitch
external usenet poster
 
Posts: 159
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)
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:05 PM.


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