PC Review


Reply
Thread Tools Rate Thread

copy all rows before empty row

 
 
=?Utf-8?B?Q2FsbGU=?=
Guest
Posts: n/a
 
      16th Oct 2006
Hi!
This macro works when I decide what cells to copy:
Set sourceRange = mybook.Worksheets(1).Rows("1:200")

But how do I write a macro that copies al the rows untill first empty row in
the sheet?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q2hhcmxlcyBDaGlja2VyaW5n?=
Guest
Posts: n/a
 
      16th Oct 2006
Range("A1", Range("A1").End(xlDown)).EntireRow.Copy
Change both "A"s to the column you want to use to look for blank data in.
--
Charles Chickering

"A good example is twice the value of good advice."


"Calle" wrote:

> Hi!
> This macro works when I decide what cells to copy:
> Set sourceRange = mybook.Worksheets(1).Rows("1:200")
>
> But how do I write a macro that copies al the rows untill first empty row in
> the sheet?

 
Reply With Quote
 
=?Utf-8?B?Q2FsbGU=?=
Guest
Posts: n/a
 
      17th Oct 2006
Thx, but this code copies the empty cells that has formulas in them.... Any
workaround?
 
Reply With Quote
 
=?Utf-8?B?Q2hhcmxlcyBDaGlja2VyaW5n?=
Guest
Posts: n/a
 
      17th Oct 2006
Can you send me an example spreadsheet and a description of what you want to
happen? (E-Mail Removed)
--
Charles Chickering

"A good example is twice the value of good advice."


"Calle" wrote:

> Thx, but this code copies the empty cells that has formulas in them.... Any
> workaround?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy rows with values in sheet 1 to next empty row in sheet2 Wes_A Microsoft Excel Programming 2 8th Mar 2010 04:25 AM
copy every 3rd row to empty rows below Annette(Omaha) Microsoft Excel Misc 3 23rd Sep 2008 03:25 PM
Copy a range of cells 15 rows down and repeat to empty cell Mike V Microsoft Excel Programming 2 6th Jun 2008 01:48 PM
Copy cell contents in empty rows below it till any unempty row com vtmalhan Microsoft Excel Misc 1 11th Feb 2008 11:26 AM
Creating an Empty copy or nearly empty copy of Access DB BriMan Microsoft Access 1 17th Sep 2004 09:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:08 AM.