Hi, i want to round the output in a cell to the specified condition.
The condition is:
Help appreciated.if "output in cell" is >x.3 then the output is rounded to x, if the "output in cell" is <x.3 then the output is rounded to x+1
Thanks,
Hi, i want to round the output in a cell to the specified condition.
The condition is:
Help appreciated.if "output in cell" is >x.3 then the output is rounded to x, if the "output in cell" is <x.3 then the output is rounded to x+1
Thanks,
Are you sure it's that way round? Taken literally that will round 5.9 to 5 and 5.1 to 6! Assuming those should be the other way round try this
=ROUND(A1+0.2,0)
Audere est facere
Hi,
=INT(B1)+(MOD(B1,1)>0.3)
You don't mention what the result should be if the output is precisely x.3
Regards
Try this
Please Login or Register to view this content.
Hi Daddylonglegs, thanks for pointing our.. yes i put ">" sign wrongly in the query .
And your solution works well. Thanks,
What if i want to add another complication to this and would want the following:
if "output in cell" is <x.3 then the output is rounded to x, if the "output in cell" is >x.3 then the output is rounded to x+1, if the "output in cell" is >0.1 then it is rounded to 1
Hi XOR LX and KVSrinivasamurthy, your formula's also work well. ZOR LX's they way i wanted, KVSrinivasamurty's the way i described the query with wrong "<>" signs. Thanks
Can you help me with the another complication in this formula with this added 3rd complication.
if the "output in cell" is >0.1 then it is rounded to 1
Between what values of "output in cell" value should be 1 .
maybe...
=if(A1<0.1,1,ROUND(A1+0.2,0)
I am assuming that again, you have the sign mixed around again?
If not,
=if(and(A1>0.1,A1<1),1,ROUND(A1+0.2,0)
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Hi kvsrinivasamurthy, the complete equation is like this:
Hi FDibbins's second code works well and this is what i wanted.if output in cell is >0.1 then round to "1" which means if the output in cell is <0.1 then round to 0
if output in cell is <x.3 then the output is rounded to x
if the output in cell is >x.3 then the output is rounded to x+1
Can you guys help me put this code in VBA function, i basically need to put this round function in many output cells where there is already a sumifs function which needs to be rounded with this new function...?=if(and(A1>0.1,A1<1),1,ROUND(A1+0.2,0)
Thanks Guys for you help! i am loving this forum more and more.
Last edited by pnegi; 09-23-2013 at 01:55 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks