Optimization and Filtering

dsdevon06

New Member
Joined
Aug 21, 2023
Messages
14
Office Version
  1. 2021
Platform
  1. Windows
I have two different data sets with similar data but different model numbers. I want to find a discus model that is closest to the reed model based on a certain criteria. That is: Uses the same refrigerant, has the same application, and then the closest capacity. I want this to be robust enough that if the criteria can change. The person who set up this excel previously did not do this. Then once this model is found, it needs outputted in the table to the right with specific data correlating to that discus model.

This was the formula used previously that works but is flawed in its filtering and picking.

=IFERROR(INDEX(A$21:A$25,MATCH(MIN(IF(($E$21:$E$25=$E9)*($C$21:$C$25=$C9)*($I$21:$I$25=$I9)*($J$1=$J$21:$J$25),ABS($G9-$G$21:$G$25))),IF(($E$21:$E$25=$E9)*($J$1=$J$21:$J$25)*($C$21:$C$25=$C9)*($I$21:$I$25=$I9),ABS($G9-$G$21:$G$25)),0)),"-")

Columns M through U and V have similar equations that look through the data set. I tried a pivot table but it gets screwed up with not having exact answers for example, Capacity.
 

Attachments

  • Test Example Photo.PNG
    Test Example Photo.PNG
    81.3 KB · Views: 9
I checked what was going on and it was successful.

What about getting the data that correlates to the outputted value
 
Upvote 0

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Yes. That's what the sortby is doing.


Clear all cells to the right of the formula
Do you need me to share another link?

I am hoping that to the left can it also output the data from the table associated with that row.

1693242675799.png
 
Upvote 0
That's what the formula does, so not sure what your asking.
 
Upvote 0
That's what the formula does, so not sure what your asking.
The formula outputs the two columns worth of data which is J7 and K7. I also need the rest of the data from that row. If J7 was 1AAAA11AA, I would like L7 to be Standard, M7 to be AA1, N7 to be R-11, O7 to be A, P7 to be 11, Q7 to be 1600. I can do the math for R7.


1693243751459.png
 
Upvote 0
Ok, how about
Excel Formula:
=LET(f,FILTER(CHOOSECOLS(A$21:J$25,1,2,10,3,4,4,6,7),($E$21:$E$25=$E7)*($D$21:$D$25=$D7)),IFERROR(INDEX(SORTBY(f,ABS(G7-INDEX(f,,7))),1,),"-"))
 
Upvote 0

Forum statistics

Threads
1,215,097
Messages
6,123,076
Members
449,094
Latest member
mystic19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top