Hi all,
I'm using a macro to remove the contents of rows but only want to clear from Column C on. Have been pulling my hair out over this one.
The macro reads -
Sub Macro1()
Range("C240").Select
ActiveCell.FormulaR1C1 = "End"
Range("C4:C250").Select
Do Until ActiveCell.Value = "End"
If ActiveCell.Value = "" Then
ActiveCell.Offset(0, 0).Select
ActiveCell.EntireRow.ClearContents
End If
ActiveCell.Offset(1, 0).Select
Loop
Range("C240").Select
Selection.ClearContents
End Sub
This clears the contents of the whole row from 4 to 240 if Cell C# is blank, but I want columns A & B to stay as is.
Thanks guys,
Den
I'm using a macro to remove the contents of rows but only want to clear from Column C on. Have been pulling my hair out over this one.
The macro reads -
Sub Macro1()
Range("C240").Select
ActiveCell.FormulaR1C1 = "End"
Range("C4:C250").Select
Do Until ActiveCell.Value = "End"
If ActiveCell.Value = "" Then
ActiveCell.Offset(0, 0).Select
ActiveCell.EntireRow.ClearContents
End If
ActiveCell.Offset(1, 0).Select
Loop
Range("C240").Select
Selection.ClearContents
End Sub
This clears the contents of the whole row from 4 to 240 if Cell C# is blank, but I want columns A & B to stay as is.
Thanks guys,
Den