How can I change the cell formatting (color) and cell contends (date) in a columns cell?
I got 5 columns and I need in the first four to change the color and on the 5th to put today?s current date by clicking or double clicking any cell in this columns.
I have sheet1 that I want to click or double click on a cell and change the color of the cell, the cells are originally ?No Fill?, but I want to predefine a color when I click or double click, for example I want Colum A be red, B blue, C yellow and D green when I click on any cell in this range. I need the functionality to toggle this on and off. The 5th column E to print today?s current date in any cell in this column when clicked (or double clicked)?
On the coloring of the cell I?m working on this code;
[VBA]
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel As Boolean)
when double-clicked again.



If Target.Interior.ColorIndex = xlNone Then


Target.Interior.ColorIndex = 3

ElseIf Target.Interior.ColorIndex = 3 Then


Target.Interior.ColorIndex = xlNone

End If

Cancel = True

End Sub

[/VBA]

Now what is the best way to predefine the ranges for the rest of colors?
Any Help is in advance appreciated