PDA

View Full Version : [SOLVED] Colour cell in column F if any value in cloumn J



Barryj
05-31-2014, 11:28 PM
I am trying to get a cell in column F coloured black if there is any value in the same row of column J, I have a worksheet change macro that does this fine but want to use a worksheet activate macro to acheive another project, I have tried altering the worksheet change macro to the below code with no luck.

Could someone steer me in the right direction with this.

It is bugging out on
If target.Column = 10

Thanks

Private Sub worksheet_activate()
If target.Column = 10 Then target.Offset(, -4).Resize(, 1).Interior.ColorIndex = 1 * Abs(target.Value >= 0)
End Sub

mikerickson
06-01-2014, 09:14 AM
I would use conditional formatting.
Put CF on F1 with the formula =(LEN($J1)>0) and then copy that CF to all the other cells of column F

Barryj
06-01-2014, 11:16 PM
Thanks Mike I'll go with that and marked it as solved.