Copy cell contents depending on font colour

A

alistew

Hi

I am looking to copy the contents from one cell to another depending on the
font colour. ie if i have information in cell A1 which turns to red then the
information is then copied to B1?

I have tried using basic vba code under Worksheet change but its not working
properly. I would like the info copied when the font colour changes not the
actual text.

Below is the code i tried.

Thanks
alison

Option Explicit



Private Sub Worksheet_Change(ByVal Target As Range)


Range("A1").Select

If Range("a1").Font.ColorIndex = 3 Then

Selection.Copy
Range("D1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End If

End Sub
 

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

Top