SOLVED

Formula to calculate % variance

Copper Contributor

Good Morning,

 

It is more a mathematical question than an excel related question but I can't figure it out by my own...

I have 20% in a cell A1, 15% in B1 I want to show the difference between the 2 in points. What will be the formula as to show in C1 +5pp ??

 

Thank you for your help

 

7 Replies

in C1 you can put formula like this

 

=TEXT((A1-B1)*100,"Generalpp")

Another trick if apply Wrap Text to C1 and number format like

#" pp"<Ctrl+J>%

More about that is here https://chandoo.org/wp/2012/01/31/custom-number-formats-multiply-divide-by-any-power-of-10/

 

Trying this one without success.

Do I have to copy paste the #"pp"<ctrl+J>% in custom format ? If yes I can't make it work ...

Thanks for your help

Thanks but I can't make it work it shows the #value error message. I'll keep trying Thanks!

best response confirmed by Jamil Mohammad (Bronze Contributor)
Solution

Nope, copy/paste like this doesn't work. In custom format box you type #" pp", after that press Ctrl and hit J, release Ctrl and type %

Combination Ctrl+J adds non-printable character which force carriage return into the string. It looks like this

image.png

% will be invisible here since it's on another line.

If uncheck Wrap Text in cell formatting you'll % within the line, with Wrap Text it's invisible since on another line within the cell

image.png

 

 

Did you try my solution =TEXT((A1-B1)*100,"Generalpp")

it will not give you an error

Now it's working! Thanks for taking the time to show me the steps

1 best response

Accepted Solutions
best response confirmed by Jamil Mohammad (Bronze Contributor)
Solution

Nope, copy/paste like this doesn't work. In custom format box you type #" pp", after that press Ctrl and hit J, release Ctrl and type %

Combination Ctrl+J adds non-printable character which force carriage return into the string. It looks like this

image.png

% will be invisible here since it's on another line.

If uncheck Wrap Text in cell formatting you'll % within the line, with Wrap Text it's invisible since on another line within the cell

image.png

 

 

View solution in original post