#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default If(And; Vlookup

I am trying to look up a value in a table that if two variables are met.
If Col F says "Receipt" and Col G has "49" then lookup Col F:O and return
the value in the 7 col over.

=IF(AND(Sheet1!F:F='Productivity Files'!A7,Sheet1!G:G='Productivity
Files'!BB3),VLOOKUP(A7,Transactions,7,0)) - This returns FALSE rather than
the actual number.

=SUMPRODUCT((Sheet1!F:F="Receipt"),(Sheet1!G:G="49 "),(Sheet1!L:L)) - This
returns #NUM! rather than the actual number. Not all variables are numbers.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 342
Default If(And; Vlookup

You have several problems with what you are trying to do. SumProduct will
add all occurances when the criteria are met, so either you have only one
occurance or you get different answers. Also, SumProduct will not return
text.

Vlookup will not analyse more than one criteria.

I think the easiest way to do what you want would be to create a helper
column in you lookup data. I column E put the formula =concatenate(F2 & G2)
[assuming this formula is on row 2] then copy it down to the bottom of the
data field. That should returm "Receipt49" if F2 is "Receipt" and G2 is "49".

Then your lookup formula would be =vlookup("Receipt49",E:O,8,false). This
will give you the result of the first occurance of your criteria in the data
field.

I hope this helps.

Tom
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default If(And; Vlookup

Thanks for the feed back.

"TomPl" wrote:

You have several problems with what you are trying to do. SumProduct will
add all occurances when the criteria are met, so either you have only one
occurance or you get different answers. Also, SumProduct will not return
text.

Vlookup will not analyse more than one criteria.

I think the easiest way to do what you want would be to create a helper
column in you lookup data. I column E put the formula =concatenate(F2 & G2)
[assuming this formula is on row 2] then copy it down to the bottom of the
data field. That should returm "Receipt49" if F2 is "Receipt" and G2 is "49".

Then your lookup formula would be =vlookup("Receipt49",E:O,8,false). This
will give you the result of the first occurance of your criteria in the data
field.

I hope this helps.

Tom

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 in vlookup - taking the result as array name SupperDuck Excel Worksheet Functions 2 June 2nd 07 11:05 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
IF(AND(val1=VLOOKUP( );val2>=VLOOKUP( );val2<=VLOOKUP( );VLOOKUP( Oso Excel Worksheet Functions 2 January 26th 05 06:56 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 02:15 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"