quick Conditional Format question <--rookie here

D

Dan

Hello -

I've set up a Condtional Format with the following code:

Range(Cells(5, 8), Cells(Rows.Count, 1)).Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=$g5>
$h5"
Selection.FormatConditions(1).Interior.ColorIndex = 4

It works fine, however I only want column H (after row 5) to be
Formatted and this will Format columns A thru H.

Thanks for any help.
Dan
 
C

carlo

You need to change following:
Range(Cells(5, 8), Cells(Rows.Count, 8)).Select

the last one should be an eight (for H), otherwise it takes the 1 as
A.

hope thats clear.

cheers

Carlo
 

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

Top