How to ignore inputs when looking for data in a table

Copper Contributor

Hi all, I would like some help trying to code in Excel without using VBA if at all possible. 

 

Data

Product and Next Product Table     Data Table   
ProductMax SA Tank of Product in Cell B4MBS of Product in Cell B4Next Product with MBS That Is Not Product in Cell B4MBS of Next Product That Is Not Product in Cell B4 ProductDensity
(mg/ml)
Volume
(ml)
MBS
(mg)
SA
(cm2)
MBS/SA
A200150000C150000 A10005050000100500.00
      A1000100100000150666.67
      A1000150150000200750.00
      B9505047500100475.00
      B95010095000150633.33
      B950150142500200712.50
      C10005050000100500.00
      C1000100100000150666.67
      C1000150150000200750.00
      D10105050500100505.00
      D1010100101000150673.33
      D1010150151500200757.50
      E9755048750100487.50
      E97510097500150650.00
      E975150146250200731.25

 

Equations

Product and Next Product Table     Data Table    
ProductMax SA Tank of Product in Cell B4MBS of Product in Cell B4Next Product with MBS That Is Not Product in Cell B4MBS of Next Product That Is Not Product in Cell B4 ProductDensity
(mg/ml)
Volume
(ml)
MBS
(mg)
SA
(cm2)
MBS/SA
A=INDEX($L$4:$L$18,MATCH(MAXIFS($M$4:$M$18,$H$4:$H$18,B4),$M$4:$M$18,0))=INDEX($K$4:$K$18,MATCH(MAXIFS($M$4:$M$18,$H$4:$H$18,B4),$M$4:$M$18,0))=INDEX(FILTER($H$4:$H$18,($H$4:$H$18<>B4)),MATCH(MIN($K$4:$K$18),$K$4:$K$18,0))=INDEX($K$4:$K$18,MATCH(1,($H$4:$H$18=E4)*($L$4:$L$18=C4),0)) A100050=J4*I4100=K4/L4
      A1000100=J5*I5150=K5/L5
      A1000150=J6*I6200=K6/L6
      B95050=J7*I7100=K7/L7
      B950100=J8*I8150=K8/L8
      B950150=J9*I9200=K9/L9
      C100050=J10*I10100=K10/L10
      C1000100=J11*I11150=K11/L11
      C1000150=J12*I12200=K12/L12
      D101050=J13*I13100=K13/L13
      D1010100=J14*I14150=K14/L14
      D1010150=J15*I15200=K15/L15
      E97550=J16*I16100=K16/L16
      E975100=J17*I17150=K17/L17
      E975150=J18*I18200=K18/L18

 

I would like to look up the product information in the Data Table based on the Product in the Product and Next Product Table, return the the product with the minimum MBS based on the SA and ignore the Product input on the Product and Next Product Table. 

 

For example, the Product in the Product and Next Product Table is A, I want the Next Product with MBS That Is Not Product in Cell B4 in Product and Next Product Table to return from the Data Table the next product that has the MBS with the same SA as in Max SA Tank of Product in Cell B4 in Product and Next Product Table.  In this case, the return value should be B.  However, if the Product is B, then the return value should be E. 

 

The formula I have for Next Product with MBS That Is Not Product in Cell B4 does not work correctly.  As shown, if A is entered, it returns C and not B.  I also know it is not based on the SA but the minimum MBS value in the Data Table that is not excluded.  If B is entered, the return is C and not E, if C, D, or E is entered, the return value is B.


I hope that all made sense and any help that can be provided would be most appreciative. 

Thanks

 

 

 

2 Replies

@awd1963 

 

You would help us help you by posting a copy of the actual workbook on OneDrive or GoogleDrive with a link pasted here that grants access.

@awd1963 

See this discussion where I replied. Why did you ask the same question again?