ExcelTip.com
Account Icon Account Icon Account Icon
ExcelTip.com

Go Back   Excel Help Forum > Limelight Media - ExcelTip.com Books > F1 Get the most out of Excel Formulas & Functions

Notices

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 11-08-2006, 08:38 PM
Paul Harris Paul Harris is offline
Registered User
 
Join Date: 08 Nov 2006
Posts: 4
Paul Harris is on a distinguished road
Help with multiple conditions with lookup table

Hi there,

I am wondering if someone is able to help with a formula that requires multiple conditions on a lookup table ?

I have attached an example as I know the above description is vague.

Thankyou in advance

Paul...
Attached Files
File Type: zip Excel Problem.zip (2.2 KB, 145 views)
Reply With Quote
  #2  
Old 11-08-2006, 10:26 PM
duane duane is offline
Forum Guru
 
Join Date: 11 Jul 2004
Posts: 848
duane is on a distinguished road
without looking at your file, assuming your two criteria are in columns a and b, and the table is 10 rows long, starting in row 1
criteria are in cells d1 and e1

=offset(c1,match(1,(a1:a10=d1)*(b1:b10=e1),0)-1,0)

entered with control+shift+enter
__________________
not a professional, just trying to assist.....
Reply With Quote
  #3  
Old 11-08-2006, 10:56 PM
Paul Harris Paul Harris is offline
Registered User
 
Join Date: 08 Nov 2006
Posts: 4
Paul Harris is on a distinguished road
Thankyou For Reply

Duane,

Thankyou for your reply but it unfortunately has only produced the dreaded #N/A result.
Reply With Quote
  #4  
Old 11-08-2006, 11:12 PM
davesexcel's Avatar
davesexcel davesexcel is offline
Forum Moderator
 
Join Date: 19 Feb 2006
Location: Cochrane,Alberta
Posts: 3,516
davesexcel will become famous soon enough davesexcel will become famous soon enough
Column H5

=INDEX($C$5:$C$25,MATCH(G5,$B$5:$B$25,FALSE),MATCH($H$4,$A$5:$A$25,FALSE))
=INDEX($C$5:$C$25,MATCH(G6,$B$5:$B$25,0),MATCH($H$4,$A$5:$A$25,0))
=INDEX($C$5:$C$25,MATCH(G7,$B$5:$B$25,0),MATCH($H$4,$A$5:$A$25,0))
=INDEX($C$5:$C$25,MATCH(G8,$B$5:$B$25,0),MATCH($H$4,$A$5:$A$25,0))
=INDEX($C$5:$C$25,MATCH(G9,$B$5:$B$25,0),MATCH($H$4,$A$5:$A$25,0))
=INDEX($C$5:$C$25,MATCH(G10,$B$5:$B$25,0),MATCH($H$4,$A$5:$A$25,0))


Column I5

=INDEX($C$5:$C$25,MATCH(1,(G5=$B$5:$B$25)*($I$4=$A$5:$A$25),0))
=INDEX($C$5:$C$25,MATCH(1,(G6=$B$5:$B$25)*($I$4=$A$5:$A$25),0))
=INDEX($C$5:$C$25,MATCH(1,(G7=$B$5:$B$25)*($I$4=$A$5:$A$25),0))
=INDEX($C$5:$C$25,MATCH(1,(G8=$B$5:$B$25)*($I$4=$A$5:$A$25),0))
=INDEX($C$5:$C$25,MATCH(1,(G9=$B$5:$B$25)*($I$4=$A$5:$A$25),0))
=INDEX($C$5:$C$25,MATCH(1,(G10=$B$5:$B$25)*($I$4=$A$5:$A$25),0))

you will have to use the iserror formula if you want to get rid of the NA

the formula in column I is an array formula you will have to hit ctrl shift enter

I don't know why but column I needed a different formula
Attached Files
File Type: zip lookup two criteria 08-Nov-06 20-08-57.zip (5.3 KB, 153 views)
__________________
Dave
Please read the Forum Rules before posting!
Reply With Quote
  #5  
Old 11-08-2006, 11:19 PM
Paul Harris Paul Harris is offline
Registered User
 
Join Date: 08 Nov 2006
Posts: 4
Paul Harris is on a distinguished road
Big Thankyou

Dave,

Thankyou very much for your help. I have been struggling with this for about a month. You have literally saved me days of work.

Thanks Champ

Paul...
Reply With Quote
  #6  
Old 11-09-2006, 06:52 AM
davesexcel's Avatar
davesexcel davesexcel is offline
Forum Moderator
 
Join Date: 19 Feb 2006
Location: Cochrane,Alberta
Posts: 3,516
davesexcel will become famous soon enough davesexcel will become famous soon enough
Lookup Two Criteria using SUMPRODUCT

Thanks for the reply,
I had forgotten about the best solution for this:
Sometimes I get stuck on the lookup formulas I forget that there is SUmproduct

this one works for both columns

Code:
column H
=SUMPRODUCT(($B$5:$B$25=G5)*($A$5:$A$25=$H$4)*($C$5:$C$25))
=SUMPRODUCT(($B$5:$B$25=G6)*($A$5:$A$25=$H$4)*($C$5:$C$25))
=SUMPRODUCT(($B$5:$B$25=G7)*($A$5:$A$25=$H$4)*($C$5:$C$25))
=SUMPRODUCT(($B$5:$B$25=G8)*($A$5:$A$25=$H$4)*($C$5:$C$25))
=SUMPRODUCT(($B$5:$B$25=G9)*($A$5:$A$25=$H$4)*($C$5:$C$25))
=SUMPRODUCT(($B$5:$B$25=G10)*($A$5:$A$25=$H$4)*($C$5:$C$25))
column I
=SUMPRODUCT(($B$5:$B$25=G5)*($A$5:$A$25=$I$4)*($C$5:$C$25))
=SUMPRODUCT(($B$5:$B$25=G6)*($A$5:$A$25=$I$4)*($C$5:$C$25))
=SUMPRODUCT(($B$5:$B$25=G7)*($A$5:$A$25=$I$4)*($C$5:$C$25))
=SUMPRODUCT(($B$5:$B$25=G8)*($A$5:$A$25=$I$4)*($C$5:$C$25))
=SUMPRODUCT(($B$5:$B$25=G9)*($A$5:$A$25=$I$4)*($C$5:$C$25))
=SUMPRODUCT(($B$5:$B$25=G10)*($A$5:$A$25=$I$4)*($C$5:$C$25))
Attached Files
File Type: zip lookup two criteria SUMPRODUCT 09-Nov-06 3-55-10.zip (5.3 KB, 185 views)
__________________
Dave
Please read the Forum Rules before posting!

Last edited by davesexcel; 11-09-2006 at 06:56 AM.
Reply With Quote
  #7  
Old 11-09-2006, 09:19 PM
Paul Harris Paul Harris is offline
Registered User
 
Join Date: 08 Nov 2006
Posts: 4
Paul Harris is on a distinguished road
Thankyou

Dave,

Thankyou for the continued thought, the second reply and thankyou for sharing your knowledge.

Now I have a working example I will be exploring the full range of possibilities that this formula and the previous one will bring.

I enjoy learning new things and I to enjoy sharing what I have learnt, mind you it is a very much lower level than yourself, but it is good to know that you can make someones day a little brighter by a simple formula.

Thanks once again

Paul...
Reply With Quote
Reply

Bookmarks

New topics in F1 Get the most out of Excel Formulas & Functions


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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

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


All times are GMT -4. The time now is 04:02 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0