View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.newusers
Andy Andy is offline
external usenet poster
 
Posts: 414
Default Formula require for complex lookup

Please help

I am looking for a formula that will give me the correct Result depending on
the Unit & Part I type into the cell

The result must pick the highest value with ref to the part and the unit used

If I use formula
=INDEX($G$24:$G$41,INDEX(MATCH($B$13&$B$15,$B$24:$ B$41&$C$24:$C$41,0),0))

Eg. If I select BBB with 10106378 the result should be "J" not "g"

If I use formula
{=VLOOKUP(MAX(IF(($B$27:$B$43=$B$15)*($C$27:$C$43= B16),$F$27:$F$43)),$F$27:$G$43,2,FALSE)}

Eg. If I select BBB with 10106195 the result should be "f" not "a" due to
the value of line 1 and 7 being the same

How do i combine these formulas into one

link data will be on another spead sheet
bbb ccc aaa
10106195
10106378
10117939
10099990
10117939


Lookup table
Unit Part Count Each Value Result
1 AAA 10106195 1 PC £91.60 a
2 AAA 10106378 8 PC £35.36 b
3 AAA 10117939 1 PC £0.01 c
4 AAA 10099990 2 PC £130.41 d
5 AAA 10117939 1 PC £1,000.00 e
6
7 BBB 10106195 2 PC £91.60 f
8 BBB 10106378 3 PC £35.36 g
9 BBB 10117939 1 PC £0.01 h
10 BBB 10099990 1 PC £130.41 i
11 BBB 10106378 5 PC £50.00 j
12
13 CCC 10106195 1 PC £91.60 k
14 CCC 10106378 1 PC £35.36 l
15 CCC 10117939 1 PC £0.01 m
16 CCC 10099990 1 PC £130.41 n
17 CCC 10106195 1 PC £100.00 o