View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default identify consecutive columns they are coloured

Sub FindRed()
Dim rng as Range, rng1 as Range
Dim cell as Range
set rng = Range("F1:CU5000")
for each cell in rng
if cell.interior.colorIndex = 3 then
if rng1 is nothing then
set rng1 = cell
else
set rng1 = union(rng1,cell)
end if
end if
Next
if not rng1 is nothing then
rng1.select
end if
End Sub

--
Regards,
Tom Ogilvy

"elaine" wrote:

Hi,

Does anyone know whether there is a way to identify within a range of
F1:CU:5000, which columns is coloured consecutively? (ie. I want to
see which row is coloured in Red from F to CU Throughout.)

Thanks.
Elaine.