Formula and formatting question

aaa89

New Member
Joined
Aug 22, 2011
Messages
32
Hi all, I need some help with a custom format. I'm trying to get green for positive, "Red $ -0.00" for negative", and black for zeros.

[Color10]_($* #,##0.00_);[Red]_($* -#,##0.00_);_($* #,##0.00,""_)

The cell formula is AB9 =IF(V9="","",V9-AA9). I used the IF to avoid the #value!, cause V9 =IF(AND(L9:P9>0,K9>""),U9*O9,""), and AA9 is a number I manually enter.

My problem is - When AB9 equals ZERO it shows me "$0.00" but in green, not black.
I suspected that might be the cell is displaying 0 but equals more, so in a blank cell, leaving the format to general I typed =AB9, instead of getting a 0 I got 3.55271E-14, why is that, is there anything wrong with my formula?

Thanks
 
Must be very difficult... Cause when using just - it does equal 0, hard to understand why the 'logic' of IF should effect that... So I guess my best and only option is to use the ROUND? Never used that one either before, whats teh ',2' for?
 
Upvote 0

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Must be very difficult... Cause when using just - it does equal 0, hard to understand why the 'logic' of IF should effect that... So I guess my best and only option is to use the ROUND? Never used that one either before, whats teh ',2' for?
Yes, use rounding.

The 2 means to round to 2 decimal places (since you're apparently dealing with currency).
 
Upvote 0
Thanks man! You nailed it! :laugh:

Since I know you know your stuff, a related question in the custom formatting I know how to apply standard colors, [red] [green] and one of the 56 pallet colors [color #], is there a way to apply a custom RGB color?
 
Upvote 0
Thanks man! You nailed it! :laugh:

Since I know you know your stuff, a related question in the custom formatting I know how to apply standard colors, [red] [green] and one of the 56 pallet colors [color #], is there a way to apply a custom RGB color?
What version of Excel are you using?
 
Upvote 0
I don't have Excel 2010 but I do have Excel 2007 and it should be pretty much the same in both versions.

Select the cell to be formatted
Right click>Format Cells
Select the Fill tab
Click More Colors
Select the Custom tab
 
Upvote 0
I was referring to do it from within the custom format window, as I posted using the color name or number from the pallet.
 
Upvote 0

Forum statistics

Threads
1,224,618
Messages
6,179,916
Members
452,949
Latest member
beartooth91

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