sudhansu121
New Member
- Joined
- Jan 19, 2021
- Messages
- 28
- Office Version
- 365
Hi Experts,
I have a sheet with a long range (B5:KW14) and each time I have to clear the data manually.
So I have to clear content from B5:H14 and the leave 2 column and aging Start clearing data from L5:L14 so on up to KP5:KW14.
The twist here is after B5:H14, I do not want to clean Column I,J,K and then again start cleaning from L5:L14. I am actually stuck here. I have prepared a macro that clean from B5:KW14.
So may I kindly ask you to help me here?
I have a sheet with a long range (B5:KW14) and each time I have to clear the data manually.
So I have to clear content from B5:H14 and the leave 2 column and aging Start clearing data from L5:L14 so on up to KP5:KW14.
The twist here is after B5:H14, I do not want to clean Column I,J,K and then again start cleaning from L5:L14. I am actually stuck here. I have prepared a macro that clean from B5:KW14.
So may I kindly ask you to help me here?
VBA Code:
Sub CleardatafirstPart()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
Select Case ws.Name
Case "DATOS", "RESUMEN DÍA"
' do nothing
Case Else
ws.Range("B5:KW14").ClearContents
ws.Range("B24:KW33").ClearContents
End Select
Next ws
End Sub