SOLVED

How to ignore values when searching the data

Copper Contributor

Hi all,

I believe I am currently using Excel 2019 but it might be 2016.

 

I posted earlier but  it was deleted for some reason and not sure why.

  1. I want to lookup a product in the Data Table that has the minimum MBS for the same SA as the product in the Results Table but ignore the results for the product in the Results Table in the Data Table. 
  2. Once it has found the MBS based on the SA in the Data Table, return the product in the Product column of the Data Table to the Results Table in the yellow filled cell. 
  3. See below for an example.

Example,

  1. The Results Table contains A in the Product column and the corresponding SA and MBS for this product is 200 and 150000 respectively. 
  2. In the Yellow filled cell, I want to search the Data Table for the product with the minimum MBS for the same SA but ignore any results associated with product A
    1. The current formulas does not seem to work, Product A returns the Next Product as C instead of B. 
    2. Product B returns the next product as C instead of E. 
    3. If I make Product D with the lowest Density such as 800 in the Data Table, then products A through D all return E instead of the product with the nest lowest MBS and Product E returns D. 
    4. Does not matter if I turn it into an array or not (CSE)
  3. I also want to avoid VBA/Macros is possible.

 

Results Table

Results Table
ProductMax SA Tank of the Product MBS of the ProductNext Product with MBS
(Ignore the product in the Product Column of this Table)
MBS of Next Product
A200150000C146250

 

Results Table Equations

Results Table
ProductMax SA Tank of the Product MBS of the ProductNext Product with MBS
(Ignore the product in the Product Column of this Table)
MBS of Next Product
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))

 

Data Table

Data Table
ProductDensity
(mg/ml)
Volume
(ml)
MBS
(mg)
SA
(cm2)
MBS/SA
A10005050000100500.00
A1000100100000150666.67
A1000150150000200750.00
B9505047500100475.00
B95010095000150633.33
B950150142500200712.50
C10005050000100500.00
C1000100100000150666.67
C1000150150000200750.00
D

1010

5040000100400.00
D1010100101000150673.33
D1010150151500200757.50
E9755048750100487.50
E97510097500150650.00
E975150146250200731.25

 

Data Table Equations

Data Table
ProductDensity
(mg/ml)
Volume
(ml)
MBS
(mg)
SA
(cm2)
MBS/SA
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
D80050=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

 

Thanks for any and all assistance

 

2 Replies
best response confirmed by awd1963 (Copper Contributor)
Solution

@awd1963 

In F4:

=MINIFS($K$4:$K$18,$H$4:$H$18,"<>"&B4,$L$4:$L$18,C4)

This calculates the lowest MBS for the same SA for products not equal to that in B4.

In E4:

=INDEX($H$4:$H$18,MATCH(1,($L$4:$L$18=C4)*($K$4:$K$18=F4),0))

This looks up the product with the same SA, and with the minimum MBS calculated in F4.

Thank you.

I see what you did. Calculated the minimum MBS for the same SA as in C4 that was not the same product as in B4 first, then used that result to calculate the product that is associated with the MBS value.

 

Also, I did not know you could do this within the function,  "<>"&B4.  Thanks for the education.

1 best response

Accepted Solutions
best response confirmed by awd1963 (Copper Contributor)
Solution

@awd1963 

In F4:

=MINIFS($K$4:$K$18,$H$4:$H$18,"<>"&B4,$L$4:$L$18,C4)

This calculates the lowest MBS for the same SA for products not equal to that in B4.

In E4:

=INDEX($H$4:$H$18,MATCH(1,($L$4:$L$18=C4)*($K$4:$K$18=F4),0))

This looks up the product with the same SA, and with the minimum MBS calculated in F4.

View solution in original post