Difference between 2 numbers

A

Alan Ralph

Hi, I'm looking to calculate the differnce between two numbers, Say I have 24
in a columnand next to it in the next column I have 25, I would like it to
show the differnce of +1 in the next column. Then say the next row down it
has 30 in the first column and 25 in the next it would be a differnce of -5
and so on. Wouls also like the cell to be highted with a colour if its a +
number and a differnt colour if its minus. If both numbers are the same then
would like a 0 and no colour. Hope you can understand what I'm looking for. I
can get it to say true or false but not to show the difference. Hope someone
can help me.
 
P

Paul C

the formula is simple
A B C
1 24 25 1
2 30 25 -5

In C1 use =B1-A1

Use Conditional Formatting (look in Excel Help for details) to do the colors
Fill with one color if greater than 0, another if less than 0. If the value
is 0 no Fill would be applied
 
R

Roger Govier

Hi Alan

Supposing we have the data in columns A and B then the formula in C1 is
=B1-A1

You could just format the column, Format>Cells>Number>Red Negative
 
A

Alan Ralph

Thanks Paul I was trying it by difference, you made it so easy I should have
thought of it. done the colour conditioning too thanks again.
 

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