Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default copy all rows before empty row

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default copy all rows before empty row

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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default copy all rows before empty row

Thx, but this code copies the empty cells that has formulas in them.... Any
workaround?
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default copy all rows before empty row

Can you send me an example spreadsheet and a description of what you want to
happen?
--
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
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
copy every 3rd row to empty rows below Annette(Omaha) Excel Discussion (Misc queries) 3 September 23rd 08 03:25 PM
Copy cell contents in empty rows below it till any unempty row com vtmalhan Excel Discussion (Misc queries) 1 February 11th 08 11:26 AM
Clipboard empty but get cannot empty CB when trying to copy Peter @ ServiceMaster Excel Worksheet Functions 0 February 22nd 07 03:58 PM
Delete Rows with Empty Cells with empty column 1 Scott Excel Programming 5 October 2nd 06 11:57 PM
How do I sort with empty rows between none empty rows? Excel Challenged Excel Worksheet Functions 1 August 17th 06 03:59 PM


All times are GMT +1. The time now is 03:12 PM.

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"