Variable ROUNDUP question from Formula

Drew Terp

New Member
Joined
Apr 12, 2024
Messages
6
Office Version
  1. 365
Platform
  1. Windows
I want to define an IF statement that rounds up to the nearest whole number if it is .75 or above, down to the nearest whole number if it is .25 or below, and rounds to .5 if between .26 and .74.


I6=(I3*0.5)/16

I3 (124) = 3.875

vs

C5=(C2*0.5)/16

C2 (261) = 8.15

vs

D6=(D3*0.5)/16

D3(274) = 8.56


Would appreciate any help.

Thank you.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Maybe this
Excel Formula:
=INT(A1)+XLOOKUP(MOD(A1,1),{0,0.26,0.75},{0,0.5,1},,-1)
 
Upvote 0
Solution
It worked perfectly. Thank you.
The marked solution has been changed accordingly. In your future questions, please mark the post as the solution that actually answered your question, instead of your feedback message as it will help future readers. No further action is required for this thread.
 
Upvote 0

Forum statistics

Threads
1,216,070
Messages
6,128,618
Members
449,460
Latest member
jgharbawi

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