Closest in Range to 100%

Jamsandwich

New Member
Joined
Sep 25, 2014
Messages
44
Hey guys,

I am using this array formula to get the closest number, in a range, to 100% -

Code:
=INDEX(B76:B79,MATCH(MIN(ABS(B76:B79-B74)),ABS(B76:B79-B74),0))

It works great. I was wondering if it is possible to make sure that it only returns values that are under 100%.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Definitely more than one way to do it. Give this a try, also array formula:

=MAX(B76:B83-B74*INT(B76:B83/B74))

If you wanted a condition for no values under 100% you could add something like this:

=IF(MAX(B76:B83-B74*INT(B76:B83/B74))>0,MAX(B76:B83-B74*INT(B76:B83/B74)),"No values under 100%")
 
Last edited:
Upvote 0
Hi

If I understand correctry you want the number closest but less than B74.

If this is correct, try this array formula:

=MAX(IF(B76:B79<B74,B76:B79))<b74,b76:b79))< html=""></b74,b76:b79))<>
 
Upvote 0
Thanks guys.

PGCs solution appears to have worked. If anything goes wrong I can try LearningToExcel's.

Problem solved!
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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