exceluser2007
Active Member
- Joined
- Nov 21, 2007
- Messages
- 365
Hi all,
I have the following 2 lines of code:
I then wanted to make it more efficient by changing it to a WITH..END WITH construct as follows:
Q1: Is there any way to more efficiently include the bold RngSheetListStart as part of the With..End With constructs?
Q:2 Also, is there a better way to do the above?That is, based on a single cell range "RngSheetListStart" (select down and clear all). Also select the cellnext to the "RngSheetListStart" and select down and clear all?
I have the following 2 lines of code:
Code:
Range(RngSheetListStart, RngSheetListStart.End(xlDown)).Clear
Range(RngSheetListStart.Offset(0, 1), RngSheetListStart.Offset(0, 1).End(xlDown)).Clear
I then wanted to make it more efficient by changing it to a WITH..END WITH construct as follows:
Code:
With RngSheetListStart
Range([B]RngSheetListStart[/B], .End(xlDown)).Clear
Range([B]RngSheetListStart[/B].Offset(0, 1), .Offset(0, 1).End(xlDown)).Clear
End With
Q1: Is there any way to more efficiently include the bold RngSheetListStart as part of the With..End With constructs?
Q:2 Also, is there a better way to do the above?That is, based on a single cell range "RngSheetListStart" (select down and clear all). Also select the cellnext to the "RngSheetListStart" and select down and clear all?