Conditional Formatting Columns

  • Thread starter Thread starter banerg
  • Start date Start date
B

banerg

Thx Tom. But the code is still coloring the blank columns same as th
max values. I was hoping to format ONLY the column max cells and res
of the tables with a different colorindex.

Anyways, if I changed the code to:

With Range("HHData").Columns(i)

If WorksheetFunction.CountBlank(.Cells) <> .Rows.Count Then,

it does the required tasks.

Thanks anyways. Appreciate your help
 
The results would only be different if you had values in cells in that
column that were outside the range HHData.

But you asked: "How can I search for empty columns"

So apparently you meant empty only within the HHData range. In any event,
the same modification to my code would handle that and require fewer
operations.

For i = 1 To NCol
With Range("HHData").Columns(i)
If Application.CountA(.cells) <> 0 Then
.FormatConditions.Delete
 

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

Back
Top