View Full Version : Solved: macro to edit background colour
see attached workbook
Hi
Need a macro that will edit the backgorund colour in row 21:26 column b irrespective where the data lies in column B if records increase or decrease over time.
So backgound colour transparnet NO FILL.
Bob Phillips
11-28-2008, 02:49 AM
Are you saying that as you add a new row, it gets coloured and you don't want it to?
Are you saying that as you add a new row, it gets coloured and you don't want it to? - yes....
100%
ok, i have managed to work out the answer i think here is me vba code
Sub No_Fill_backgroundColour()
With Application
.ScreenUpdating = False
End With
Dim rng As Range, cell As Range
Set rng = Range("B4:B" & Cells(65536, "B").End(xlUp).Row)
For Each cell In rng
If (cell.Offset(0, -1).Value <> "") Then
cell.Interior.ColorIndex = xlNone
End If
Next cell
With Application
.ScreenUpdating = True
End With
End Sub
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.