xxcucumberxx
New Member
- Joined
- Feb 23, 2016
- Messages
- 7
I cant get my Macro to find and fill blanks in column "m" starting from row 2. It fills the blanks but it also fill the blanks all the way down to the end of the spreadsheet. I just need it to fill to the last row of data. Also to reset the color when i rerun the macro. So i can fix it and rerun it and so it un-colors the ones with data in it
Columns("M:M").Select
With Selection.Font
.ColorIndex = xlAutomatic
.TintAndShade = 0
End With
Range("O6").Select
Dim myRange As Range
Set myRange = Sheet1.Range("M2:M5000")
'clear all color
myRange.Interior.ColorIndex = xlNone
'color only blank cells
myRange.SpecialCells(xlCellTypeBlanks).Interior.ColorIndex = 6
Please help me fix this. Thank you so much who does. Maybe there is a different formula i could use or something
Columns("M:M").Select
With Selection.Font
.ColorIndex = xlAutomatic
.TintAndShade = 0
End With
Range("O6").Select
Dim myRange As Range
Set myRange = Sheet1.Range("M2:M5000")
'clear all color
myRange.Interior.ColorIndex = xlNone
'color only blank cells
myRange.SpecialCells(xlCellTypeBlanks).Interior.ColorIndex = 6
Please help me fix this. Thank you so much who does. Maybe there is a different formula i could use or something