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:
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.
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.