Sumproduct - Closest to?

jamescooper

Well-known Member
Joined
Sep 8, 2014
Messages
834
EFGH
361. Trapstyle Thea9614.50£127.89
371. Trapstyle Thea9416.50£134.52
381. Trapstyle Thea9116.00£138.52
391. Trapstyle Thea8916.00£142.52
401. Trapstyle Thea8516.00£146.52
411. Trapstyle Thea8119.00£151.30
421. Trapstyle Thea8016.50£160.57
431. Trapstyle Thea7318.50£161.57
441. Trapstyle Thea7018.50£161.60
451. Trapstyle Thea6419.00£170.31
461. Trapstyle Thea6015.50£190.34
471. Trapstyle Thea5915.50£195.54
481. Trapstyle Thea5116.00£195.83
491. Trapstyle Thea4915.00£217.83
501. Trapstyle Thea4916.00£218.17
511. Trapstyle Thea4915.00£218.25
521. Trapstyle Thea4516.00£218.65
531. Trapstyle Thea4316.00£223.85
541. Trapstyle Thea4316.00£224.06

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Data

I'd like to return the value in column H that is closest to 75 in column F and equal to 1. Trapstyle Thea.

I am thinking sumproduct?

Thanks.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
"closest to 75 in column F and equal to 1"

What do you want to equal 1?
What result do you want from the sample data?
 
Last edited:
Upvote 0
Sorry closest to 75 in column F and equal to in column E "1. Trapstyle Thea".

In this example it would be £161.57

Thanks.
 
Upvote 0
it will be easier with a helper column


Book1
FGHIJKL
361. Trapstyle Thea9614.5£127.89211. Trapstyle Thea
371. Trapstyle Thea9416.5£134.521975
381. Trapstyle Thea9116£138.5216161.57
391. Trapstyle Thea8916£142.5214
401. Trapstyle Thea8516£146.5210
411. Trapstyle Thea8119£151.306
421. Trapstyle Thea8016.5£160.575
431. Trapstyle Thea7318.5£161.572
441. Trapstyle Thea7018.5£161.605
451. Trapstyle Thea6419£170.3111
461. Trapstyle Thea6015.5£190.3415
471. Trapstyle Thea5915.5£195.5416
481. Trapstyle Thea5116£195.8324
491. Trapstyle Thea4915£217.8326
501. Trapstyle Thea4916£218.1726
511. Trapstyle Thea4915£218.2526
521. Trapstyle Thea4516£218.6530
531. Trapstyle Thea4316£223.8532
541. Trapstyle Thea4316£224.0632
Sheet1
Cell Formulas
RangeFormula
L38=INDEX($I$36:$I$54,MATCH(MINIFS($J$36:$J$54,$F$36:$F$54,$L$36),$J$36:$J$54,0))
J36=ABS(G36-$L$37)
 
Upvote 0
Hi,

Try this array formula,

[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]
Book1
BCDEFGHI
3361. Trapstyle Thea9614.5£127.89Value75
4371. Trapstyle Thea9416.5£134.52Value1. Trapstyle Thea
5381. Trapstyle Thea9116£138.52
6391. Trapstyle Thea8916£142.52Result161.57
7401. Trapstyle Thea8516£146.52
8411. Trapstyle Thea8119£151.30
9421. Trapstyle Thea8016.5£160.57
10431. Trapstyle Thea7318.5£161.57
11441. Trapstyle Thea7018.5£161.60
12451. Trapstyle Thea6419£170.31
13461. Trapstyle Thea6015.5£190.34
14471. Trapstyle Thea5915.5£195.54
15481. Trapstyle Thea5116£195.83
16491. Trapstyle Thea4915£217.83
17501. Trapstyle Thea4916£218.17
18511. Trapstyle Thea4915£218.25
19521. Trapstyle Thea4516£218.65
20531. Trapstyle Thea4316£223.85
21541. Trapstyle Thea4316£224.06
Sheet1
Cell Formulas
RangeFormula
I6{=INDEX(F3:F21,MATCH(INDEX(D3:D21,MATCH(MIN(ABS(D3:D21-I3)),IF(C3:C21=I4,ABS(D3:D21-I3)),0)),D3:D21,0),1)}
Press CTRL+SHIFT+ENTER to enter array formulas.
[/FONT]
 
Upvote 0

Forum statistics

Threads
1,214,972
Messages
6,122,530
Members
449,088
Latest member
RandomExceller01

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