Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MAKE FONT GO RED ON CONDITION

Status
Not open for further replies.

gsc123

Programmer
Jan 24, 2008
197
Hi I'm trying to creat a conditon so the font goes read when this sum is actioned

=IF(F172-G172=0,"no","")

the "no" section I would like to make E172 contents read - is this possible?
 
You can either:
=IF(F172-G172=0,TRUE,FALSE)
or just:
=(F172=G172)

combo
 
Yes but whats the code to make the font change colour on a different cell?
 
No code required. For given cell, Format>Conditional formatting, in this case 'Formula is' option, choose permitted formatting to whatever you like.
You can set up to three formats. excel applies format for first conditions satisfied.

combo
 
Have you tried to to apply conditional formatting directly? It's much easier than any remote explanations.

combo
 
Go to the cell you want to be red.
Format, ConditionalFormat....Formula is (F172=G172) .....

Gavin
 
Plus I see that these are manual instructions, what if I want this formula throughout my sheet, surely dont have to do each row manually?
 
Still doesn't work" doesn't give much to work with! Rest assured that conditional formatting can be used to change the format depending on a condition being true. Just experiment a bit!

You can either select all the cells and then apply the conditional format.
Or you can copy the format you have applied to one cell to others
Either way make sure your formula uses relative addresses (no $ signs)

Gavin
 
tried all this -- my conditon is

=IF(G172 - H172 = 0)MAKE CELL B172 RED, DONT BOTHER)
 
Use the menu path Format,Conditional Formatting
The "formula is" entry should simply be:
=G172-H172=0
OR, more simply
=G172=H172



Gavin
 
For your case, select cell B172 and set formula and format in the conditional formatting dialog.
The conditional formatting works only for cells where you apply it. With relative references (no '$' sign) references in formula move if you copy the cell.
If you need to apply formatting for a column and check condition in row, select a column and apply condition with relative references to active cell.




combo
 
FANTASTIC! - what I did'nt know was the first drop down box was set to cell is not formula is -- last request, how do I copy this condition over 800 rows with overwriting the text that is unique in each cell?
 
Either select a range and apply formatting (relative) to active cell or just format one cell and copy>paste special>formats (formulas in conditions behave like regular formulas in copying).

combo
 
Appears to be overwriting my text, if I use cond formula over the whole range what would my formula be then?
 
1. Cell contents will stay unchanged if you pastespecial>formats.
2. The result will depend on formula in condition. Suppose you select A1:B10 with cell A10 active. Formula =($C$10=0) will set the same condition for each cell. Formula =($C10=0) will change to =($C9=0) in row 9, etc. Same rules as entering formula in a cell and copying contents to another.

combo
 
Sorry you've lost me

if I have say =H172>G172 for one cell B172 - how would I alter the formula for each cell in B1:B172?
 
If you need a condition =H172>G172 in all cells for B1:B172, change it to =H$172>G$172. If you need a condition refering to the same row as the formatted cell, left the formula =H172>G172. Next: copy cell B172, select range B1:B172, paste formats. See conditions in pasted range.
Just do some experiment with locking formulas (with '$') and pasting formats.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top