Microsoft Excel - show the difference between two numbers

Asked By Becky
02-Sep-10 07:12 PM
hi, i'm trying to find the formula to show the differnce (+ or -) between two numbers in an excel sheet. i'd like it to show the - or be displayed in red if there is a negative number.
thanks,
becky
  Venkat K replied to Becky
02-Sep-10 09:43 PM
You can use conditional formatting to change the color of text based on some condition:

1. Open a new Excel file.
2. Type in some sample numbers in a column B like 0, -1, and 1. In column C, We will mention on which color the cells should be.
It looks like:

Column B Column C
  0
  -1
  1
3. Select the cells you want to be affected by the conditional formatting. In this example, I have selected B2, B3, B4, C2, C3, and C4.
4. Select the cells you want to be affected by the conditional formatting. In this example, I have selected B2, B3, B4, C2, C3, and C4.
The Conditional Formatting box will appear.

excelconditionalformattining-settingitup1 (7k image)

5. In this box, change Condition 1 to "Formula Is".

6. Then type "=$B2=0" without the quotation marks. This is saying that if the cell in this row that resides on the B column is equal to zero, then the conditional formatting will be applied.


7. Click Format... to specify the format applied when the condition is true. The format can include font, cell color, borders, and more.

In this example, I set the formatting to color the cell blue.


8. Click Add >> to add another row in the Conditional Formatting box.


9. Repeat steps 5 through 7 twice. Specify different formatting options and use the following formulas: "=$B2<0" and "=$B2>0". When you're done, your Conditional Formatting box should look like the sample below.

Thanks,
Venkat..
  iHelper MS replied to Becky
02-Sep-10 10:50 PM
Becky, if you are using Excel 2007, then you can use this link to learn the Conditional Formatting:

http://msdn.microsoft.com/en-us/library/bb226688%28v=office.11%29.aspx

Thanks,
iHelper
Create New Account
help
Edit? Excel Where is the option Edit for Microsoft Excel 2007 Excel Miscellaneous Discussions Microsoft Excel (1) Worksheets (1) Excel 2007 (1) Excel 2003 (1) Office (1) Series (1) Toolbar (1) Lapis (1) There is
would like to buy microsoft excel 2007 WORK BOOK Excel would like to buy microsoft excel 2007 WORK BOOK Excel New Users Discussions CompUSA (1) BestBuy (1) Reinhardt (1) MABAR (1) Check BestBuy or CompUSA
logarithmic charting and excel 2007 Excel Excel 2007 seems to have corrected some probs with previous versions e.g., you can now use be helpful to know if there are any undoable things with log scales, or has excel 2007 fixed them all. If not, can anyone suggest any products that may fix any residual problems. Thanks a lot. Excel Charting Discussions Microsoft Excel (1) Excel 2007 (1) Noticeboard (1) Scales (1) Jonny (1) Probs
user-defined charts in Excel 2007 Excel How do you create user-defined charts (as they were called in 2003) in Excel 2007? Excel Charting Discussions Microsoft Excel (1) Office 2003 (1) Excel 2007 (1) Office (1) Chart (1) Battarbee (1) Laura (1
Encrypt Numbers Excel 2007 Excel How do I encrypt a column (numbers) in Excel 2007? Excel Discussions HodgeTAKETHISOUT (1) Excel 2003 (1) Excel 2007 (1) Southampton (1) Jbelles (1) Year (1) It might be better if you explained