Formatting negative numbers

hp75150

New Member
Joined
Sep 10, 2014
Messages
31
Office Version
  1. 365
Platform
  1. Windows
I am having trouble formatting negative numbers. I have two columns of numbers and I want to highlight the one that is greater. If they are negative it will ignore the negative. For example see below. I need a formula that works. I used =ifb1>d1 in conditional format to highlight f b1 is greater. But like I said it ignores the negative as you can see in b4 and b6. Any help will be appreciated.

[TABLE="width: 206"]
<colgroup><col width="83" style="width: 62pt; mso-width-source: userset; mso-width-alt: 3035;"> <col width="64" style="width: 48pt;" span="3"> <tbody>[TR]
[TD="width: 83, bgcolor: transparent"] A
[/TD]
[TD="width: 64, bgcolor: transparent"] B
[/TD]
[TD="width: 64, bgcolor: transparent"] C
[/TD]
[TD="width: 64, bgcolor: transparent"] D
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]$1,004,476 [/TD]
[TD="bgcolor: transparent, align: right"]-8.18[/TD]
[TD="bgcolor: transparent, align: right"]$51,212 [/TD]
[TD="bgcolor: transparent, align: right"]1.71[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]$3,946,561 [/TD]
[TD="bgcolor: transparent, align: right"]-8.53[/TD]
[TD="bgcolor: transparent, align: right"]$365,070 [/TD]
[TD="bgcolor: transparent, align: right"]4.54[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]$3,776,271 [/TD]
[TD="align: right"]-1.15[/TD]
[TD="bgcolor: transparent, align: right"]$271,294 [/TD]
[TD="bgcolor: transparent, align: right"]-1.45[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]$3,728,023 [/TD]
[TD="align: right"]-0.66[/TD]
[TD="bgcolor: transparent, align: right"]$38,056 [/TD]
[TD="bgcolor: transparent, align: right"]-0.52[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]$2,635,464 [/TD]
[TD="align: right"]-1.98[/TD]
[TD="bgcolor: transparent, align: right"]$119,067 [/TD]
[TD="bgcolor: transparent, align: right"]-2.9[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]$1,519,864 [/TD]
[TD="align: right"]-7.65[/TD]
[TD="bgcolor: transparent, align: right"]$139,199 [/TD]
[TD="bgcolor: transparent, align: right"]-2.72[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]$514,896 [/TD]
[TD="bgcolor: transparent, align: right"]-5.21[/TD]
[TD="bgcolor: transparent, align: right"]$18,258 [/TD]
[TD="bgcolor: transparent, align: right"]8.01[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]$255,818 [/TD]
[TD="bgcolor: transparent, align: right"]-15.14[/TD]
[TD="bgcolor: transparent, align: right"]$13,087 [/TD]
[TD="bgcolor: transparent, align: right"]6.24[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]$956,084 [/TD]
[TD="align: right"]-9.07[/TD]
[TD="bgcolor: transparent, align: right"]$96,793 [/TD]
[TD="bgcolor: transparent, align: right"]-0.66[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]$1,258,367 [/TD]
[TD="bgcolor: transparent, align: right"]-16.1[/TD]
[TD="bgcolor: transparent, align: right"]$42,305 [/TD]
[TD="bgcolor: transparent, align: right"]14.93[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]$2,751,372 [/TD]
[TD="bgcolor: transparent, align: right"]-4.03[/TD]
[TD="bgcolor: transparent, align: right"]$148,035 [/TD]
[TD="bgcolor: transparent, align: right"]4.31[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]$447,579 [/TD]
[TD="align: right"]-6.52[/TD]
[TD="bgcolor: transparent, align: right"]$53,733 [/TD]
[TD="bgcolor: transparent, align: right"]-1.5[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]$2,692,657 [/TD]
[TD="bgcolor: transparent, align: right"]15.69[/TD]
[TD="bgcolor: transparent, align: right"]$179,203 [/TD]
[TD="bgcolor: transparent, align: right"]0.73[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]$5,958,192 [/TD]
[TD="bgcolor: transparent, align: right"]-8.08[/TD]
[TD="bgcolor: transparent, align: right"]$254,835 [/TD]
[TD="bgcolor: transparent, align: right"]6.35[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]$3,393,899 [/TD]
[TD="bgcolor: transparent, align: right"]-6.57[/TD]
[TD="bgcolor: transparent, align: right"]$122,395 [/TD]
[TD="bgcolor: transparent, align: right"]0.06[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]$1,035,032 [/TD]
[TD="align: right"]-4.81[/TD]
[TD="bgcolor: transparent, align: right"]$93,237 [/TD]
[TD="bgcolor: transparent, align: right"]-17.59[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]$2,277,558 [/TD]
[TD="align: right"]-5.15[/TD]
[TD="bgcolor: transparent, align: right"]$148,912 [/TD]
[TD="bgcolor: transparent, align: right"]-7.55[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]$348,991 [/TD]
[TD="align: right"]-11.06[/TD]
[TD="bgcolor: transparent, align: right"]$3,421 [/TD]
[TD="bgcolor: transparent, align: right"]-22.91[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]$25,415 [/TD]
[TD="bgcolor: transparent, align: right"]26[/TD]
[TD="bgcolor: transparent, align: right"]$0 [/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: right"]$720,022 [/TD]
[TD="align: right"]-7.24[/TD]
[TD="bgcolor: transparent, align: right"]$37,790 [/TD]
[TD="bgcolor: transparent, align: right"]-10.94[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Re: Help formatting negative numbers

If the original b4 and b6 get highlighted.
 
Upvote 0
Re: Help formatting negative numbers

Could you be more specific, since nothing is highlighted in your post. What do you want to happen that is not currently happening?
 
Upvote 0
Are you saying the if statement ignores the negative or you want to. If you want to treat the value as positive even if it shows negative use =abs("B1"). If just the positive numbers =IF(AND("B1" >0, "B1" > "D1"),TRUE,FALSE)
 
Upvote 0
Re: Help formatting negative numbers

I want to compare column b to d and highlight column b if greater than the corresponding number in column d. Using the formula I posted B4 and B6 get highlighted even though the are not larger than d4 and d6.
 
Upvote 0
Re: Help formatting negative numbers

I suspect those cells are text then, or you have the conditional formatting applied incorrectly.
 
Upvote 0
Re: Help formatting negative numbers

I used =if("B1" > "D1",TRUE,FALSE) and it was fine.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top