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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read Excel Cell Background Colour 1

Status
Not open for further replies.

Halliarse

IS-IT--Management
Jan 8, 2007
213
GB
Can anyone please advise if it is possible to determine the background colour of a specific cell within Excel. I have managed to determine the font colour so I'm hopeful that it can be done as I need to export data from the spreadsheet and place it specifically in a column on a CSV file based on if there is a colour!

Any help or advise will be GREATLY received!

Many thanks

Steve

 
Hi,

Range.Interior.Color

Skip,

[glasses]Just traded in my OLD subtlety...
for a NUance![tongue]
 
Skip knows this stuff 'by heart'. :)
When I want to find out the proper VBA syntax, I just create a little Macro in Excel (and 'cheat')

Macro gave me this:

Code:
    Range("F11").Select
    With Selection.Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .Color = 65535
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With

Which can be shorten to just this:

Code:
Range("F11").Interior.Color = vbYellow

Have fun.

---- Andy

A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station.
 
Yea, I shuda made it more generic...

SomeRange.Interior.Color

Skip,

[glasses]Just traded in my OLD subtlety...
for a NUance![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top