LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
DKehl
 
Posts: n/a
Default visual basic in excel -

Hi - I would like to Copy/Paste an area dependant on how many rows there are
on a spreadsheet. I was thinking of using something like the below:

X = COUNT("D:D")

Range("A1:A" & X).Select
Selection.Copy
Range("D1:D" & X).Select
ActiveSheet.Paste
Range("E4:E" & X).Select

Setting X as the COUNT of Column D, then adding '&' X to the Range to set
the length of the Copy/Paste.
I haven't gotten it to work. Any advice?

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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
I Visual Basic Error "File Not Found" when Excel opens Brent E Excel Discussion (Misc queries) 1 March 2nd 05 03:20 AM
quattro pro converter Excel 2003 dr88363 New Users to Excel 0 February 27th 05 05:00 PM
Visual Basic Code Remains in "memory" Paul Moles Excel Worksheet Functions 1 December 10th 04 10:29 PM
Excel 2003 Database Driver Visual FoxPro 7 on Server 2003. Cindy Winegarden Excel Discussion (Misc queries) 0 November 28th 04 12:07 AM


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

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

About Us

"It's about Microsoft Excel"