Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Dai Tanaka   on Feb 21 In MS Office Category.

  
Question Answered By: Gustavo Costa   on Feb 21

This is an extract of some code you can also find on the ExcelVBA site.
To determine  the color  index just use your recorder and add some colors you
would like to use.


With Range("A1")

nr = Range(.Cells(1, 1), .End(xlDown)).Rows.Count
nc = Range(.Cells(1, 1), .End(xlToRight)).Columns.Count

For r = 1 To nr
For c = 1 To nc

If .Cells(r, c).Interior.ColorIndex = ?? Then

ElseIf .Cells(r, c).Interior.ColorIndex = ?? Then

End If

Next c
Next r

End With

Share: 

 
 
Didn't find what you were looking for? Find more on Discover Cell Background Color Or get search suggestion and latest updates.


Tagged: