ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Select the current region excluding the top row (https://www.excelbanter.com/excel-programming/413176-select-current-region-excluding-top-row.html)

DZ

Select the current region excluding the top row
 
Hi

I want to select the current region excluding the top row
The following did not work

Selection.CurrentRegion.Resize(-1, 0).Select

Can someone help me ?

RyanH

Select the current region excluding the top row
 
This assumes you have only 1 Row as your header if that changes just change
the 1 to however many rows you need as your header.

Sub SelectRange()

Dim myRange As Range

Set myRange = ActiveCell.CurrentRegion

myRange.Offset(1, 0).Resize(myRange.Rows.Count - 1,
myRange.Columns.Count).Select

End Sub


Hope this helps! If so, please give us credit.

--
Cheers,
Ryan


"DZ" wrote:

Hi

I want to select the current region excluding the top row
The following did not work

Selection.CurrentRegion.Resize(-1, 0).Select

Can someone help me ?



All times are GMT +1. The time now is 01:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com