ROUNDUP and ROUNDDOWN FUNCTION errors

32CARDS

Board Regular
Joined
Jan 1, 2005
Messages
123
A UDF function seems to interfere sometimes with the rest of the workbooks entire process for some reason.

I could use the CEILNG function to work around the glitch, but it does not seem to allow the flexibility required because it takes everything to 1.
So for example if a Value is 9.24, CEILING will Sum to 10 when when it must be 9, unless I'm missing something.
But if the Value is 9.25 or 9.26 then rounded value must go to 10


The basic math required in the formula bar then is:
x = the value in Cell range.

if (x < 0.25) then x = 0
if (x >= 0.25) and (x < 0.75) then x = 1 ' or 5
if (x >= 0.75) then x = 1

x values appear in cell ranges:
J9,J10 and J11

The rounded Values of those Cell Ranges are in:
R9,R10 and R11

The question is,
How is the correct Syntax of that above ROUNDUP/ROUNDOWN written so it works in the Formula bar instead ?

The other question is then, why would a UDF ROUNDING Function mess with the entire process of the workbook's other macros, even if I place the UDF in a VBA module on it's own ?

Much prefer though to use the Formula bar instead though if possible.


Thanks in advance.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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