ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Resizing range (https://www.excelbanter.com/excel-programming/377227-resizing-range.html)

Barb Reinhardt

Resizing range
 
I have a range defined and what I'd like to do is redefine another range
programmatically that includes everything but the first row of the initial
range. Can someone assist?

Thanks

Dave Peterson

Resizing range
 
dim myRng as range
dim my2ndRng as range

with worksheets("sheet9999")
set myrng = .range("somerangenamehere") 'or something
end with

with myrng
set my2ndrng = .resize(.rows.count-1,.columns.count).offset(1,0)
end with



Barb Reinhardt wrote:

I have a range defined and what I'd like to do is redefine another range
programmatically that includes everything but the first row of the initial
range. Can someone assist?

Thanks


--

Dave Peterson


All times are GMT +1. The time now is 02:36 PM.

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