ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how do I add round to a IF statement? (https://www.excelbanter.com/excel-worksheet-functions/241391-how-do-i-add-round-if-statement.html)

Kelly Ditsworth

how do I add round to a IF statement?
 
I have the following formula and I want to round the same cell. Is this
possible?
=IF(C8=0,C8*J8,J8)

Sean Timmons

how do I add round to a IF statement?
 
=IF(C8=0,ROUND(C8*J8,0),round(J8,0))

"Kelly Ditsworth" wrote:

I have the following formula and I want to round the same cell. Is this
possible?
=IF(C8=0,C8*J8,J8)


Pete_UK

how do I add round to a IF statement?
 
Well, if C8 does equal zero, then C8*J8 will also equal zero, so your
formula could be written as:

=IF(C8=0,0,J8)

Did you mean to write:

=IF(C8=0,J8,J8*C8)

?

Anyway, to round it to 2 decimal places, for example, you can just put
ROUND around your formula (whichever it is) like this:

=ROUND(your_formula,2)

Hope this helps.

Pete

On Sep 2, 12:51*am, Kelly Ditsworth <Kelly
wrote:
I have the following formula and I want to round the same cell. *Is this
possible?
=IF(C8=0,C8*J8,J8)



Kelly Ditsworth[_2_]

how do I add round to a IF statement?
 
Sean: It worked like a champ. I been fighting this for quite awhile.
thanks so much!

"Sean Timmons" wrote:

=IF(C8=0,ROUND(C8*J8,0),round(J8,0))

"Kelly Ditsworth" wrote:

I have the following formula and I want to round the same cell. Is this
possible?
=IF(C8=0,C8*J8,J8)


joeu2004

how do I add round to a IF statement?
 
"Kelly Ditsworth" <Kelly wrote:
I have the following formula and I want to round the same cell. Is this
possible?
=IF(C8=0,C8*J8,J8)


=ROUND(IF(C8=0,C8*J8,J8), 2)

The IF() example does make sense as written. But I presume it is meant to
be a paradigm, not actual functionality.



All times are GMT +1. The time now is 09:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com