Hi there
If I in cell A1 have the letter S or L then I want that cell B1 change the background colour. Is that possible with VBA?
Alring
Hi there
If I in cell A1 have the letter S or L then I want that cell B1 change the background colour. Is that possible with VBA?
Alring
Re: Colour cell
do you really need VBA for this when simple CONDITIONAL FORMATTING will do the trick???
Re: Colour cell
Hi pangolin
I can't get CONDITIONAL FORMATTING to work in another cell than the cell where I have written S or L.
I can get CONDITIONAL FORMATTING to work in cell A1, but not in cell B1 because cell B1 is empty. But according to what is sritten in cell A1 then should B1 be coloured too.
Alring
Re: Colour cell
Hi,
Select B1 and apply the following Conditional Formatting formula[vba]=OR($A$1="L",$A$1="S")[/vba]
Re: Colour cell
Hi Andy
It seems that it doesn't work. I can only get it to work when I tehn also write "=Or($A$1="L",$A$1="S") " in cell B1. But B1 is empty.
Alring
Re: Colour cell
I have a macro that look like this:
Sub colour_Click()
If Range("A2") = "l" Then
Range("B2").Select
Selection.FormatConditions.Delete
Selection.FormatConditions(1).Interior.ColorIndex = 3
End If
End Sub
But it don't work.
Re: Colour cell
See attached
Re: Colour cell
Hi Andy
Thank you for your exsamble. Now i could see what I was doing wrong. I copied your formela and didn't change "," to ";".
SORRY :gift:
But anyway thank you for your reply. :thanx:
Alring
Don’t have an account yet? Register yourself now and be a part of our community!