Question on conditional formatting

  • Thread starter Thread starter Carl Imthurn
  • Start date Start date
C

Carl Imthurn

Hello out there --

What I would like to do is this:
look at cells a1 through a4000 and if the fill color of the
cell is red (vbRed, I think) then put an "X" in the
corresponding cell in column H

For example:

if the fill color of cell A343 is red, then put an "X" in
cell H343.

Can this be done? If so, could someone steer me in the right
direction for coding this?

Thanks in advance!

Carl
 
Hi
not tested but try
sub color_x()
dim rng as range
dim cell as range
set rng = activesheet.range("A1:A400")
for each cell in rng
if cell.interior.colorindex = 3 then
cell.offset(0,7).value = "X"
end if
next
end sub
 
Frank --

That did it! Thank you *very much* for your time and expertise.

Carl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top