dynamic/iterative searching

A

aaa

Hi, I hope you can help.
Given multiple inputs I'm trying to automate finding a price from a large
table. The table has following layout (this could be changed if it helps):

Item1 Item1 Item1 Item1
Material1 Material1 Material2 Material2
Style1 Style2 Style1 Style2
Size1 Price1 Price2 Price3 Price4
Size2 Price5 Price6 Price7 Price8
Size3 Price9 Price10 Price11 Price12

The inputs given would be item, material, style and size. The problem with
the LOOKUP functions and INDEX is specifying the column. Specifying the
column depends on 3 inputs and so is sort of iterative. Will any of Excel's
functions let me do what I want?

Thanks in advance,
Derrick
 
S

Shane Devenshire

Hi,

Assume the top left corner of your table is A1 and you enter the
Item1
Material1
Style2
Size3

In G1:G4 then this will return the results you want

=SUMPRODUCT((B1:E1=G1)*(B2:E2=G2)*(B3:E3=G3)*(A4:A6=G4)*B4:E6)
 
A

aaa

Hi Shane, and thank you very much. The SUMPRODUCT function does the trick,
except for when a price is text, e.g. "Price on application", instead of a
numerical $ value. Is there a simple way to overcome this problem?

Cheers,
Derrick
 
A

aaa

Sorry Shane, I had already clicked yes on SMartin's post. Thanks for the
help guys and for the tip to use the evaluate formula feature to try to
understand the solution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Help with userform labels 3
Making numbers show in database 8
IIf Statemen In Query 10
Sum of SQL Statement 1

Top