blossomthe2nd
Active Member
- Joined
- Oct 11, 2010
- Messages
- 450
Hi Guys
I am looking for a bit a code that changes the Background colour of a cell if the value is "B"
I wish for the following to happen,
Within Range B3 : DT367
If the cell is grey (15) and has the value "B" in it ,
Change the cell to No back ground and the value to "bananas"
I have tried the following but to no avail , Please help
Thanks
A
For Each cell In Range("B3:DT367")
If cell.Value = "B" Then cell.Value = "Bananas"
Next cell
For Each cell In Range("B3:DT367")
If cell.Value = "B" Then cell.Interior.ColorIndex = xlNone
Next cell
I am looking for a bit a code that changes the Background colour of a cell if the value is "B"
I wish for the following to happen,
Within Range B3 : DT367
If the cell is grey (15) and has the value "B" in it ,
Change the cell to No back ground and the value to "bananas"
I have tried the following but to no avail , Please help
Thanks
A
For Each cell In Range("B3:DT367")
If cell.Value = "B" Then cell.Value = "Bananas"
Next cell
For Each cell In Range("B3:DT367")
If cell.Value = "B" Then cell.Interior.ColorIndex = xlNone
Next cell