Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Round up or down by set variable
Is there a way to have a number round up or down based on a threshhold it
hits between the two number? I want a number when it hits .8 to round up, otherwise round down. For example 1.8 would round up to 2 but 1.79 would round down to 1 2.8 would round up to 3 but 2.79 would round down to 2, etc. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Round up or down by set variable
=IF(MOD(A2,1)<0.8,ROUNDDOWN(A2,0),ROUNDUP(A2,0))
-- Best Regards, Luke M "Supe" wrote in message ... Is there a way to have a number round up or down based on a threshhold it hits between the two number? I want a number when it hits .8 to round up, otherwise round down. For example 1.8 would round up to 2 but 1.79 would round down to 1 2.8 would round up to 3 but 2.79 would round down to 2, etc. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Round up or down by set variable
Hi,
One way =IF(MOD(A1,1)=0.8,CEILING(A1,1),INT(A1)) -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Supe" wrote: Is there a way to have a number round up or down based on a threshhold it hits between the two number? I want a number when it hits .8 to round up, otherwise round down. For example 1.8 would round up to 2 but 1.79 would round down to 1 2.8 would round up to 3 but 2.79 would round down to 2, etc. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Round up or down by set variable
"Supe" wrote in message
... I want a number when it hits .8 to round up, otherwise round down. [....] For example 1.8 would round up to 2 but 1.79 would round down to 1 Ostensibly: =rounddown(A1,0) + (mod(A1,1)=0.8) But that would round 1.795 down to 1, even though it might display as 1.80 (Number with 2 dp). So I wonder if you would be happier with: =rounddown(A1,0) + (round(mod(A1,1),2)=0.8) ----- original message ----- "Supe" wrote in message ... Is there a way to have a number round up or down based on a threshhold it hits between the two number? I want a number when it hits .8 to round up, otherwise round down. For example 1.8 would round up to 2 but 1.79 would round down to 1 2.8 would round up to 3 but 2.79 would round down to 2, etc. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Runtime Error '91' Object variable or With block variable not set | Excel Discussion (Misc queries) | |||
variable height variable width stacked bar charts | Charts and Charting in Excel | |||
Sum cells based on a row variable and seperate column variable | Excel Worksheet Functions | |||
why is it saying sheetcnt is "variable not defined" how to do a global variable to share over multiple functions in vba for excel? | Excel Worksheet Functions | |||
How do I ROUND() round off decimals of a column dataset? | Excel Worksheet Functions |