formula to show + or - before the result of an existing formula

J

Jamie

I need a formula that will display + or - in front of the value of my current
formula.

B4=7.5 B3=6.5

I want the result to display +15% or - if that were applicable.

Right now it just displays the whole # if positive and nothing if negative.

What I have =IF(B4/B3-100%>0,B4/B3-100%,"")
 
M

MyVeryOwnSelf

I need a formula that will display + or - in front of the value of my
current formula.

B4=7.5 B3=6.5

I want the result to display +15% or - if that were applicable.

One way is to use two steps.

First, use the formula:
=IF(B3=0,"-",B4/B3-100%)
(Notice the added check for dividing by zero.)

Second, select the cell holding the formula and use:
Format > Cells > Number > Custom
and in the Type field put
+0%;-0%
 
J

Jamie

MyVeryOwnSelf said:
One way is to use two steps.

First, use the formula:
=IF(B3=0,"-",B4/B3-100%)
(Notice the added check for dividing by zero.)

Second, select the cell holding the formula and use:
Format > Cells > Number > Custom
and in the Type field put
+0%;-0%

Thank you very much. Everything worked just as I had asked.
One thing I left out. This is an ongoing chart that I'm inputting data in periodically and the premade graph updates as I go. With the new formula, my result now displays -100% for the cells that I haven't entered in any data for yet. This is trivial, but with the new formula can the result still display nothing with no data in cell B4?
 
M

MyVeryOwnSelf

First, use the formula:
One thing I left out. This is an ongoing chart that I'm inputting
data in periodically and the premade graph updates as I go. With the
new formula, my result now displays -100% for the cells that I
haven't entered in any data for yet.
... can the result still display nothing with no data in cell B4?

One way:
=IF(OR(B3=0,B4=""),"",B4/B3-100%)
but you probably figured out something like that already.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top