Need Help

P

Phxlatinoboi®

I am using the following formula:

=IF(I9<>0,(H9-I9)/I9,IF(H9<>0,(G9-H9)/H9,IF(G9<>0,(F9-G9)/G9,0)))

How can I get the results to show if negative to turn "red" and if positive
to be "black"?
 
B

Bob Phillips

Look up conditional formatting in Help.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
P

Phxlatinoboi®

The results show up as a percentage.
Bob Phillips said:
Look up conditional formatting in Help.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
J

John Michl

An easier method than conditional formatting is to apply cell
formating. Select the cell, right click and select Format Cells >
Numbers. The Number and Currency formats include several options for
handling negative numbers including red text, parenthesis, minus signs,
etc. Just choose the one you like from the list.

To get fancier, choose one that is close to what you like and select
OK. Then open the format cells dialog again but choose custom. You
can change colors, add text and do a variety of things to format the
result.

- John
www.JohnMichl.com
 
P

Phxlatinoboi®

How would I write the custom code that if the results are negative to change
to red, but if not to stay as is?
 
J

John Michl

If the results are a percentage, use Custom Format and enter this

0.00%;[Red]0.00%

- John
 

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

Similar Threads


Top