Sumproduct - Closest to?

jamescooper

Well-known Member
Joined
Sep 8, 2014
Messages
840
EFGH
1. Trapstyle Thea
1. Trapstyle Thea
1. Trapstyle Thea
1. Trapstyle Thea
1. Trapstyle Thea
1. Trapstyle Thea
1. Trapstyle Thea
1. Trapstyle Thea
1. Trapstyle Thea
1. Trapstyle Thea
1. Trapstyle Thea
1. Trapstyle Thea
1. Trapstyle Thea
1. Trapstyle Thea
1. Trapstyle Thea
1. Trapstyle Thea
1. Trapstyle Thea
1. Trapstyle Thea
1. Trapstyle Thea

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]36[/TD]

[TD="align: right"]96[/TD]
[TD="align: right"]14.50[/TD]
[TD="align: right"]£127.89[/TD]

[TD="align: center"]37[/TD]

[TD="align: right"]94[/TD]
[TD="align: right"]16.50[/TD]
[TD="align: right"]£134.52[/TD]

[TD="align: center"]38[/TD]

[TD="align: right"]91[/TD]
[TD="align: right"]16.00[/TD]
[TD="align: right"]£138.52[/TD]

[TD="align: center"]39[/TD]

[TD="align: right"]89[/TD]
[TD="align: right"]16.00[/TD]
[TD="align: right"]£142.52[/TD]

[TD="align: center"]40[/TD]

[TD="align: right"]85[/TD]
[TD="align: right"]16.00[/TD]
[TD="align: right"]£146.52[/TD]

[TD="align: center"]41[/TD]

[TD="align: right"]81[/TD]
[TD="align: right"]19.00[/TD]
[TD="align: right"]£151.30[/TD]

[TD="align: center"]42[/TD]

[TD="align: right"]80[/TD]
[TD="align: right"]16.50[/TD]
[TD="align: right"]£160.57[/TD]

[TD="align: center"]43[/TD]

[TD="align: right"]73[/TD]
[TD="align: right"]18.50[/TD]
[TD="align: right"]£161.57[/TD]

[TD="align: center"]44[/TD]

[TD="align: right"]70[/TD]
[TD="align: right"]18.50[/TD]
[TD="align: right"]£161.60[/TD]

[TD="align: center"]45[/TD]

[TD="align: right"]64[/TD]
[TD="align: right"]19.00[/TD]
[TD="align: right"]£170.31[/TD]

[TD="align: center"]46[/TD]

[TD="align: right"]60[/TD]
[TD="align: right"]15.50[/TD]
[TD="align: right"]£190.34[/TD]

[TD="align: center"]47[/TD]

[TD="align: right"]59[/TD]
[TD="align: right"]15.50[/TD]
[TD="align: right"]£195.54[/TD]

[TD="align: center"]48[/TD]

[TD="align: right"]51[/TD]
[TD="align: right"]16.00[/TD]
[TD="align: right"]£195.83[/TD]

[TD="align: center"]49[/TD]

[TD="align: right"]49[/TD]
[TD="align: right"]15.00[/TD]
[TD="align: right"]£217.83[/TD]

[TD="align: center"]50[/TD]

[TD="align: right"]49[/TD]
[TD="align: right"]16.00[/TD]
[TD="align: right"]£218.17[/TD]

[TD="align: center"]51[/TD]

[TD="align: right"]49[/TD]
[TD="align: right"]15.00[/TD]
[TD="align: right"]£218.25[/TD]

[TD="align: center"]52[/TD]

[TD="align: right"]45[/TD]
[TD="align: right"]16.00[/TD]
[TD="align: right"]£218.65[/TD]

[TD="align: center"]53[/TD]

[TD="align: right"]43[/TD]
[TD="align: right"]16.00[/TD]
[TD="align: right"]£223.85[/TD]

[TD="align: center"]54[/TD]

[TD="align: right"]43[/TD]
[TD="align: right"]16.00[/TD]
[TD="align: right"]£224.06[/TD]

</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

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
"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,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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