View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
alistew alistew is offline
external usenet poster
 
Posts: 22
Default Copy cell contents depending on font colour

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