LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default inserted copied range into different worksheets

I was trying to code VBA to copy a dynamic range from Worksheet 1,
count the number of rows of the range (single column), then in
Worksheet 2, tried to insert the counted number of rows beginning at
the selected cell before pasting the selected range.
,,,
ActiveCell.Resize(n).EntireRow.Insert
activecell.paste

However, after the row insert, the range is pasted all the way across
the worksheet (same data coped to the column IV).

================================================== =
I found that I needed to revise the codes to the below:
1) from Wksht 1, located the range, count the rows involved
2) go to Wksht 2, insert the rows needed
3) return to Wksht 1. copy the range
4) back to Wksht 2, pasted the range .

Are there some easy ways to do this?
Thanks.

 
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
How many worksheets can be inserted in one workbook? Bobby New Users to Excel 1 May 10th 08 07:31 AM
Named-range source-data for pie charts on copied worksheets [email protected] Charts and Charting in Excel 4 March 19th 07 05:50 AM
Selecting a cell in a row just inserted in a range. Shannon Excel Programming 3 February 11th 06 03:44 PM
Change Order of Inserted Worksheets Lilbit Excel Programming 3 January 6th 06 07:00 PM
Charts in copied worksheets Shawn[_6_] Excel Programming 4 April 20th 04 01:46 PM


All times are GMT +1. The time now is 04:20 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"