Find range by interior color
Hi Tom,
Thanks for your help. Code works as expected. After some thinking and
"msgboxing"
I guess I get the code. But still not able to figure out how to find the
number of found
ranges and how to split them to separate variables. Grateful for more help.
Brgds
CG rosén
"Tom Ogilvy" wrote in message
...
By looping
Dim rng as Range, cell as Range
for each cell in rows(9).Cells
if cell.interior.ColorIndex = 15
if rng is nothing then
set rng = cell
else
set rng = union(cell,rng)
end if
end if
Next
if not rng is nothing then
msgbox rng.Address
End if
--
Regards,
Tom Ogilvy
"CG Rosén" wrote in message
...
Good Day,
How to approach the task to find ranges by its interior
color? Have intermitent, and unevenly, in the same Row, ranges with the
same
interior color (=15). Is it possible to find the addresses of these
ranges?
The ranges contain no values.
Brgds
CG Rosén
|