Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Resize Range Question

Greetings,

I am confused. This code,

Range("Mine").Resize(50).Name = "MyTable"

takes the number of columns from Mine and takes the row from Mine and then
adds 50 rows and then uses these references for MyTable.

How would I modify this resize to build MyTable maintaining the same columns
as Mine, but starting one row above the Mine row and also adding 50 rows?

Thanks in advance for your help.

Ray


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Resize Range Question

maybe:

with range("Mine")
.offset(-1,0).resize(.rows.count+50).name = "myTable"
end with

(or should that be +51???)



Ray Batig wrote:

Greetings,

I am confused. This code,

Range("Mine").Resize(50).Name = "MyTable"

takes the number of columns from Mine and takes the row from Mine and then
adds 50 rows and then uses these references for MyTable.

How would I modify this resize to build MyTable maintaining the same columns
as Mine, but starting one row above the Mine row and also adding 50 rows?

Thanks in advance for your help.

Ray


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Resize Range Question

Ray Batig wrote:

Greetings,

I am confused. This code,

Range("Mine").Resize(50).Name = "MyTable"

takes the number of columns from Mine and takes the row from Mine and then
adds 50 rows and then uses these references for MyTable.

How would I modify this resize to build MyTable maintaining the same columns
as Mine, but starting one row above the Mine row and also adding 50 rows?

Thanks in advance for your help.

Ray



Your terminology is a little confusing. Range("Mine").Resize(50).Name =
"MyTable" doesn't add 50 rows to Mine; it changes the size of Mine to 50
rows. If Mine started out with 40 rows, it adds 10; If Mine started out
with 55 rows, it subtracts 5.

The following will name as "MyTable" a 51-row range with as many columns
as Mine started out with, and beginning one row above the row on which
Mine started out. Is that what you wanted?

Range("Mine")(0,1).Resize(51,Range("Mine").Columns .Count).Name="MyTable"

Alan Beban
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default <Dave & Alan Resize Range Question

Thanks to you both. Either solution worked. I appreciate your help!

Ray

Ray Batig wrote in message
ink.net...
Greetings,

I am confused. This code,

Range("Mine").Resize(50).Name = "MyTable"

takes the number of columns from Mine and takes the row from Mine and then
adds 50 rows and then uses these references for MyTable.

How would I modify this resize to build MyTable maintaining the same

columns
as Mine, but starting one row above the Mine row and also adding 50 rows?

Thanks in advance for your help.

Ray




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resize Range - Macro Danny Excel Worksheet Functions 11 October 22nd 05 12:37 AM
Range Resize jacqui Excel Programming 2 April 6th 04 06:22 PM
Range Resize property jacqui[_2_] Excel Programming 7 February 24th 04 06:11 PM
Resize Range Problem ExcelMonkey[_16_] Excel Programming 3 January 23rd 04 11:15 PM
Resize and a question a Excel Programming 6 December 2nd 03 03:01 PM


All times are GMT +1. The time now is 11:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"