PDA

View Full Version : Solved: Extend selection to next three cells



afzalw
04-16-2013, 06:05 PM
I have selected the last cell in a column after A21 and I want to select next 3 cells in the selected ROW and clear the content from it.

Thanks

ThisWorkbook.Sheets(1).Range("A21").End(xlDown).Select

afzalw
04-16-2013, 06:19 PM
I made it, this is the correct code

ThisWorkbook.Sheets(1).Range("A21").End(xlDown).Select
Selection.Resize(Selection.Rows.Count, Selection.Columns.Count + 3).ClearContents

snb
04-17-2013, 01:36 AM
or


ThisWorkbook.Sheets(1).Range("A21").End(xlDown).resize(,3).clearcontents