ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   formula to show + or - before the result of an existing formula (https://www.excelbanter.com/excel-discussion-misc-queries/224632-formula-show-before-result-existing-formula.html)

Jamie

formula to show + or - before the result of an existing formula
 
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%,"")



MyVeryOwnSelf[_2_]

formula to show + or - before the result of an existing formula
 
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%



MyVeryOwnSelf[_2_]

formula to show + or - before the result of an existing formul
 
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%


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.

Jamie

formula to show + or - before the result of an existing formul
 
Thak you very much. I did figure it out. Thaks for your help.


"MyVeryOwnSelf" wrote:

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%


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.



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

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