IF statements and font colour

acura

New Member
Joined
Apr 23, 2002
Messages
6
this may seem like an odd question. Im trying to set up an IF statement using 2 sheets. Im am basically saying IF (cell A) is greater than (Cell B), then print (cell A) in a new cell, AND USE GREEN FONT.
I can setup the IF statement no problem, but I dont know if there is a way to include putting the info in green font if it satisfies the IF statement. Any help would be much appreciated.
thanks
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Ive looked through there, and I cant find anything that gives me a syntax for font attributes.
 
Upvote 0
duh..further to the above question.
I have it setup like this:

a1 a2
if a2>a1...then print a2 in green font.

figured that out.

Now I cant figure out how to copy this conditional formula downwards through b1 b2, c1 c2 etc...it keeps copying the formula making reference to cell a1...Ive tried highlighting the whole range of cells to be formatted with the same conditions, but it will not allow me to do so....

help!
thx.
 
Upvote 0
On 2002-04-24 12:43, acura wrote:
duh..further to the above question.
I have it setup like this:

a1 a2
if a2>a1...then print a2 in green font.

figured that out.

Now I cant figure out how to copy this conditional formula downwards through b1 b2, c1 c2 etc...it keeps copying the formula making reference to cell a1...Ive tried highlighting the whole range of cells to be formatted with the same conditions, but it will not allow me to do so....

help!
thx.

So you've applied a conditional format to cell A2? Copy A2 and Paste Special... Formats onto cell B2, C2, etc.

...Or, with cell A2 selected double-click the Format Painter toolbar button and the drag across B2, C2, etc.
 
Upvote 0
Acura,

If you're trying to anchor A1 use $A$1

If you want to copy and paste using B1,C1, etc. click on the cell, copy, go to Edit/Paste Special/Format
 
Upvote 0
Ive tried both those methods..The problem that I seem to be getting, is even when I "paste special" the formats, to cells b2, c2 etc...it is still basing the conditional formula on the original cell A1.

ie: if a2 > a1 print a2 in green font.
when i paste special the format down to cell b2, it is still comparing b2 to a1...and not b1...I dont know why...ive tried paste special and format painter, with the same results.
 
Upvote 0
ok..im a moron.

ive figured it out....when I used that conditional format wizard thing, and clicked to select the cell to base my conditions on...it automatically defaulted to $a$1...
duh.
 
Upvote 0
On 2002-04-24 12:55, acura wrote:
Ive tried both those methods..The problem that I seem to be getting, is even when I "paste special" the formats, to cells b2, c2 etc...it is still basing the conditional formula on the original cell A1.

ie: if a2 > a1 print a2 in green font.
when i paste special the format down to cell b2, it is still comparing b2 to a1...and not b1...I dont know why...ive tried paste special and format painter, with the same results.

An easier method is to select the whole range of interest starting at A1 and use your formula:

=A2>A1
 
Upvote 0

Forum statistics

Threads
1,213,517
Messages
6,114,089
Members
448,548
Latest member
harryls

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