ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need to detect cell shading (https://www.excelbanter.com/excel-programming/276630-re-need-detect-cell-shading.html)

Tom Ogilvy

Need to detect cell shading
 
Dim rng as range, cell as Range
For each cell in Range("A1:A10")
if cell.Interior.ColorIndex < xlNone then
if rng is nothing then
set rng = Cell
else
set rng = union(rng,cell)
end if
end if
Next
if not rng is nothing then
rng.select
End if

Might be what you want.

--
Regards,
Tom Ogilvy



"Buddy" wrote in message
...
I have a requirement to detect only cells that have been
shaded. Is there a funtion to accomplish this?

Thank You





All times are GMT +1. The time now is 01:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com