Highlight closest without going over

jac508

New Member
Joined
Jul 13, 2016
Messages
5
Hello! I am trying to create a scoring sheet for a price is right style of game. I want to be able to enter each person's guess in cells B2 through B19 and have it highlight the cell(s) that is/are closest without going over the actual price, which is found in cell B20. I know I need to create a new rule under conditional formatting, but I cannot figure out the formula. I've referenced a few other threads that address highlighting the closest cell, but I'm having trouble limiting it to be less than the reference cell. Any help is appreciated. Thank you!
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
13,871
Office Version
  1. 365
Platform
  1. Windows
Depends which version of excel you have (please update your Account details to show this).

Personally, I would use
Excel Formula:
=$B2=MAXIFS($B$2:$B$19,$B$2:$B$19,"<="&$B$20)
applied to B2:B19 as a CF rule.
 
Solution

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
63,890
Office Version
  1. 365
Platform
  1. Windows
How about
+Fluff 1.xlsm
B
1
225
328
450
543
627
738
821
920
1026
1143
1232
1347
1450
1538
1637
1743
1835
1929
2034
Sheet2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:B19Expression=B2=MAX(IF($B$20-$B$2:$B$19>=0,$B$2:$B$19))textNO
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
63,890
Office Version
  1. 365
Platform
  1. Windows
Glad we could help & thanks for the feedback.
 

Forum statistics

Threads
1,144,158
Messages
5,722,824
Members
422,460
Latest member
VBA_Noob01

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
Top