andrewb90
Well-known Member
- Joined
- Dec 16, 2009
- Messages
- 1,077
Hello all,
I have a code that I am using to clear cell contents and formatting, however what I need to do is also clear the contents of whatever is in Column B of the same row(s) that are selected and having the contents deleted. Here's my code:
So, if cells F89:I89 were selected, then the contents of B89 would be cleared.
If G90:K92 were selected then B90:B92 would need to be cleared.
Is this doable?
I have a code that I am using to clear cell contents and formatting, however what I need to do is also clear the contents of whatever is in Column B of the same row(s) that are selected and having the contents deleted. Here's my code:
Code:
Sub Clear()With Selection
.Interior.Color = xlNone
.Font.ColorIndex = xlAutomatic
End With
Sheets("RO").Visible = True
Sheets("RO").Range(Selection.Address).Offset(-85, -2).ClearContents
'Sheets("RO").Visible = False
Sheets("Scheduler").Select
End Sub
So, if cells F89:I89 were selected, then the contents of B89 would be cleared.
If G90:K92 were selected then B90:B92 would need to be cleared.
Is this doable?