![]() |
Rounding Question
I am using the roundown function and everything works fine. However, one of
my number when rounded down = 1 when 1 is divided in 1/2 (which I have to do) the rounddown function takes it to a zero when instead I need it to stay at 1. If there any to test for a greater than or less than value in a cell? or how would ya'll suggest I handle this situation. Thank you Hank PS, I'm a real excel newbie.... |
a1=value
b1=rounddown(a1,0) c1=if(b1=1,1,rounddown(b1/2,0)) -- Carlos "PastorHankWi" wrote in message ... I am using the roundown function and everything works fine. However, one of my number when rounded down = 1 when 1 is divided in 1/2 (which I have to do) the rounddown function takes it to a zero when instead I need it to stay at 1. If there any to test for a greater than or less than value in a cell? or how would ya'll suggest I handle this situation. Thank you Hank PS, I'm a real excel newbie.... |
If you want anything less than one to be one and you never want any zeros,
try IF(ROUNDDOWN(A1,0)=0,1,ROUNDDOWN(A1,0)). If there are legitimate zero cells, try IF(A10,IF(ROUNDDOWN(A1,0)=0,1,ROUNDDOWN(A1,0)),0) Hope that helps. Jane "PastorHankWi" wrote: I am using the roundown function and everything works fine. However, one of my number when rounded down = 1 when 1 is divided in 1/2 (which I have to do) the rounddown function takes it to a zero when instead I need it to stay at 1. If there any to test for a greater than or less than value in a cell? or how would ya'll suggest I handle this situation. Thank you Hank PS, I'm a real excel newbie.... |
Fantastic, thank you ma'am, that's exactly what I wanted to do. I program
with VFP and couldn't find anything about IF statements in the Excel Doc. Thanks again. H "Jane" wrote: If you want anything less than one to be one and you never want any zeros, try IF(ROUNDDOWN(A1,0)=0,1,ROUNDDOWN(A1,0)). If there are legitimate zero cells, try IF(A10,IF(ROUNDDOWN(A1,0)=0,1,ROUNDDOWN(A1,0)),0) Hope that helps. Jane "PastorHankWi" wrote: I am using the roundown function and everything works fine. However, one of my number when rounded down = 1 when 1 is divided in 1/2 (which I have to do) the rounddown function takes it to a zero when instead I need it to stay at 1. If there any to test for a greater than or less than value in a cell? or how would ya'll suggest I handle this situation. Thank you Hank PS, I'm a real excel newbie.... |
All times are GMT +1. The time now is 11:17 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com