First match two cells then find closes value to another value corresponding to another cell

Molke

New Member
Joined
Dec 12, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi Great people of excel users

I have I problem I need some help solving, I have looked at some different ways to solve it, can't make it work.

I want to be able to change the value in "kategory" to either a,b or c, and then the value I input underneath correspond to the closet value in that column's results.

so here I have a 1500, which will give me 1520
were if I have b 1640, it will give me 1600 since it closer to 1600 than 1700 in the b values

Hope it makes sence, and you guys can help me :)
 

Attachments

  • Screenshot_1.png
    Screenshot_1.png
    1.6 KB · Views: 7
  • Screenshot_2.png
    Screenshot_2.png
    3.1 KB · Views: 7

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Here's one way that works,
Codename.xlsm
AB
1
2a1420
3a1520
4a1620
5b1500
6b1600
7b1700
8c1410
9c1510
10c1610
11
12ab
1315001640
1415201600
Sheet2
Cell Formulas
RangeFormula
A14:B14A14=AGGREGATE(14,6,$B$2:$B$10/($A$2:$A$10=A12)/(ABS($B$2:$B$10-A13)=AGGREGATE(15,6,ABS($B$2:$B$10-A13)/($A$2:$A$10=A12),1)),1)
 
Upvote 0
Thank you so much, it works exactly as intended :)
Have a Good Weekend and Holidays :)
 
Upvote 0

Forum statistics

Threads
1,215,593
Messages
6,125,715
Members
449,254
Latest member
Eva146

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