Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

if statements excel

Posted on 2011-10-25
3
Medium Priority
?
319 Views
Last Modified: 2012-08-13
If i want a cell to say this.. how would i write in excel formula. if cell c5 is less than c3 then turn the font red....if the c5 is equal to then font color be black...if c5 is greater than c3 than font color be green....its doesnt ahve to be font color either it can be cell color...

0
Comment
Question by:chefkeifer
  • 2
3 Comments
 
LVL 81

Accepted Solution

by:
byundt earned 2000 total points
ID: 37028406
You have to use Conditional Formatting for this purpose. You will want 2 rules:
=C$5<C$3                    red font
=C$5>C$3                    green font

The normal font color (used when C5=C3) will be black

In Excel 2007 and 2010, you find Conditional Formatting in the Home menu. You want "New Rule..." and "Use a formula to determine which cells to format"

I added the $ to the formulas in case you want to compare other columns on rows 3 and 5. If so, select all the cells before opening the Conditional Formatting menu item.
0
 

Author Comment

by:chefkeifer
ID: 37028547
can you apply two rules to the same cell...not sure how to do that...
0
 
LVL 81

Expert Comment

by:byundt
ID: 37028575
In Excel 2003 (and earlier), you can apply 3 rules to the same cell. Excel 2007 and later let you apply many more rules. Just keep clicking the New Rule button while your cells are selected.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question