#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 231
Default VLOOKUP & IF

Hi All,

I am looking to use an if statement with 2 separate vlookups. Is this
possible? Basically what I want to do is if B3=PWRFUT then
lookup(A3,'FUT'!A1:C20,2)
However, if B3 does not equal PWRFUT then lookup(A3,'FX'!A1:C20,2)

Please help - thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default VLOOKUP & IF

Hi,

=if(B3="PWRFUT",lookup(A3,'FUT'!A1:C20,2),lookup(A 3,'FX'!A1:C20,2))

"Sarah" wrote:

Hi All,

I am looking to use an if statement with 2 separate vlookups. Is this
possible? Basically what I want to do is if B3=PWRFUT then
lookup(A3,'FUT'!A1:C20,2)
However, if B3 does not equal PWRFUT then lookup(A3,'FX'!A1:C20,2)

Please help - thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 231
Default VLOOKUP & IF

Everything feeds in as #NA with that formula.

"Eduardo" wrote:

Hi,

=if(B3="PWRFUT",lookup(A3,'FUT'!A1:C20,2),lookup(A 3,'FX'!A1:C20,2))

"Sarah" wrote:

Hi All,

I am looking to use an if statement with 2 separate vlookups. Is this
possible? Basically what I want to do is if B3=PWRFUT then
lookup(A3,'FUT'!A1:C20,2)
However, if B3 does not equal PWRFUT then lookup(A3,'FX'!A1:C20,2)

Please help - thanks

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default VLOOKUP & IF

Hi,
could you post an example of your data and the results you are looking for,
thanks

"Sarah" wrote:

Everything feeds in as #NA with that formula.

"Eduardo" wrote:

Hi,

=if(B3="PWRFUT",lookup(A3,'FUT'!A1:C20,2),lookup(A 3,'FX'!A1:C20,2))

"Sarah" wrote:

Hi All,

I am looking to use an if statement with 2 separate vlookups. Is this
possible? Basically what I want to do is if B3=PWRFUT then
lookup(A3,'FUT'!A1:C20,2)
However, if B3 does not equal PWRFUT then lookup(A3,'FX'!A1:C20,2)

Please help - thanks

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 231
Default VLOOKUP & IF

Ok so below is my main information on my summary spreadsheet and the due date
column is where I need the formula to pull in.

deal_num Instrument Type Due Date
20732 PWR-EXCH-FUT 9/29/2009
20733 PWR-EXCH-FUT 10/7/2009
20734 PWR-EXCH-FUT 7/2/2009
21607 PWR-PHYS 7/20/2010
21608 PWR-PHYS 7/20/2010


Here is the information from the Futures spreadsheet, so If the instrument
type from above is equal to PWR-EXCH-FUT, then lookup the associated deal
number on the Futures spreadsheet and pull the event date into due date
column above

deal_tracking_num event_date
20732 9/29/2009
20733 10/7/2009
20734 7/2/2009
20735 7/2/2009
20736 7/6/2009

And here is the information from the FX spreadsheet for the 2nd vlookup, so
If the instrument type from above is not equal to PWR-EXCH-FUT, then lookup
the associated deal number in the FX spreadsheet and pull the event date into
due date column above

deal_tracking_num event_date
21589 1/20/2011
21607 7/20/2010
21608 7/20/2010
21609 7/20/2010
21618 1/20/2011
21619 1/20/2011

"Eduardo" wrote:

Hi,
could you post an example of your data and the results you are looking for,
thanks

"Sarah" wrote:

Everything feeds in as #NA with that formula.

"Eduardo" wrote:

Hi,

=if(B3="PWRFUT",lookup(A3,'FUT'!A1:C20,2),lookup(A 3,'FX'!A1:C20,2))

"Sarah" wrote:

Hi All,

I am looking to use an if statement with 2 separate vlookups. Is this
possible? Basically what I want to do is if B3=PWRFUT then
lookup(A3,'FUT'!A1:C20,2)
However, if B3 does not equal PWRFUT then lookup(A3,'FX'!A1:C20,2)

Please help - thanks



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default VLOOKUP & IF

Hi,
try

=IF(B1="PWR-EXCH-FUT",INDEX(FUT!$B$2:$B$20,MATCH(A1,FUT!$A$2:$A$20, 0)),INDEX(FX!$B$2:$B$20,MATCH(A1,FX!$A$2:$A$20,0)) )

"Sarah" wrote:

Ok so below is my main information on my summary spreadsheet and the due date
column is where I need the formula to pull in.

deal_num Instrument Type Due Date
20732 PWR-EXCH-FUT 9/29/2009
20733 PWR-EXCH-FUT 10/7/2009
20734 PWR-EXCH-FUT 7/2/2009
21607 PWR-PHYS 7/20/2010
21608 PWR-PHYS 7/20/2010


Here is the information from the Futures spreadsheet, so If the instrument
type from above is equal to PWR-EXCH-FUT, then lookup the associated deal
number on the Futures spreadsheet and pull the event date into due date
column above

deal_tracking_num event_date
20732 9/29/2009
20733 10/7/2009
20734 7/2/2009
20735 7/2/2009
20736 7/6/2009

And here is the information from the FX spreadsheet for the 2nd vlookup, so
If the instrument type from above is not equal to PWR-EXCH-FUT, then lookup
the associated deal number in the FX spreadsheet and pull the event date into
due date column above

deal_tracking_num event_date
21589 1/20/2011
21607 7/20/2010
21608 7/20/2010
21609 7/20/2010
21618 1/20/2011
21619 1/20/2011

"Eduardo" wrote:

Hi,
could you post an example of your data and the results you are looking for,
thanks

"Sarah" wrote:

Everything feeds in as #NA with that formula.

"Eduardo" wrote:

Hi,

=if(B3="PWRFUT",lookup(A3,'FUT'!A1:C20,2),lookup(A 3,'FX'!A1:C20,2))

"Sarah" wrote:

Hi All,

I am looking to use an if statement with 2 separate vlookups. Is this
possible? Basically what I want to do is if B3=PWRFUT then
lookup(A3,'FUT'!A1:C20,2)
However, if B3 does not equal PWRFUT then lookup(A3,'FX'!A1:C20,2)

Please help - thanks

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default VLOOKUP & IF

Try

=IF(B3="PWRFUT",VLOOKUP(A3,FUT!A1:C20,2,0),VLOOKUP (A3,FX!A1:C20,2,0))

--
Jacob (MVP - Excel)


"Sarah" wrote:

Hi All,

I am looking to use an if statement with 2 separate vlookups. Is this
possible? Basically what I want to do is if B3=PWRFUT then
lookup(A3,'FUT'!A1:C20,2)
However, if B3 does not equal PWRFUT then lookup(A3,'FX'!A1:C20,2)

Please help - thanks

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 231
Default VLOOKUP & IF

Hi Jacob - that formula pulls in the date for anything that is PWRFUT, but if
B3 does not equal that, then its not looking up on the FX sheet. Everything
that isnt PWRFUT is feeding in as N/A

"Jacob Skaria" wrote:

Try

=IF(B3="PWRFUT",VLOOKUP(A3,FUT!A1:C20,2,0),VLOOKUP (A3,FX!A1:C20,2,0))

--
Jacob (MVP - Excel)


"Sarah" wrote:

Hi All,

I am looking to use an if statement with 2 separate vlookups. Is this
possible? Basically what I want to do is if B3=PWRFUT then
lookup(A3,'FUT'!A1:C20,2)
However, if B3 does not equal PWRFUT then lookup(A3,'FX'!A1:C20,2)

Please help - thanks

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 231
Default VLOOKUP & IF

Actually Jacob I adjusted it and it works now. Thanks so much for your help.

"Sarah" wrote:

Hi Jacob - that formula pulls in the date for anything that is PWRFUT, but if
B3 does not equal that, then its not looking up on the FX sheet. Everything
that isnt PWRFUT is feeding in as N/A

"Jacob Skaria" wrote:

Try

=IF(B3="PWRFUT",VLOOKUP(A3,FUT!A1:C20,2,0),VLOOKUP (A3,FX!A1:C20,2,0))

--
Jacob (MVP - Excel)


"Sarah" wrote:

Hi All,

I am looking to use an if statement with 2 separate vlookups. Is this
possible? Basically what I want to do is if B3=PWRFUT then
lookup(A3,'FUT'!A1:C20,2)
However, if B3 does not equal PWRFUT then lookup(A3,'FX'!A1:C20,2)

Please help - thanks

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default VLOOKUP & IF

=IF(B3="PWRFUT",VLOOKUP(A3,FUT!A1:C20,2,0),VLOOKU P(A3,FX!A1:C20,2,0))

Another way to write that formula:

=VLOOKUP(A3,IF(B3="PWRFUT",FUT!A1:C20,FX!A1:C20),2 ,0)

--
Biff
Microsoft Excel MVP


"Sarah" wrote in message
...
Actually Jacob I adjusted it and it works now. Thanks so much for your
help.

"Sarah" wrote:

Hi Jacob - that formula pulls in the date for anything that is PWRFUT,
but if
B3 does not equal that, then its not looking up on the FX sheet.
Everything
that isnt PWRFUT is feeding in as N/A

"Jacob Skaria" wrote:

Try

=IF(B3="PWRFUT",VLOOKUP(A3,FUT!A1:C20,2,0),VLOOKUP (A3,FX!A1:C20,2,0))

--
Jacob (MVP - Excel)


"Sarah" wrote:

Hi All,

I am looking to use an if statement with 2 separate vlookups. Is
this
possible? Basically what I want to do is if B3=PWRFUT then
lookup(A3,'FUT'!A1:C20,2)
However, if B3 does not equal PWRFUT then lookup(A3,'FX'!A1:C20,2)

Please help - 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
If (Vlookup 0) working, but what if Vlookup cell does not exist Steve Excel Worksheet Functions 18 November 18th 09 07:33 PM
VLookUp - Does the VLookUp return the exact information? Cpviv Excel Worksheet Functions 2 October 28th 08 09:57 AM
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
Vlookup -=VLOOKUP(F9,LookUp1!$A$2:$B$1504,2,FALSE) MikeR-Oz New Users to Excel 1 March 22nd 06 09:01 AM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM


All times are GMT +1. The time now is 11:37 PM.

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"