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: 3
Default Copying a range to the row below

I want to copy a range of cells in one row to the next empty row.

I do it like this:

Worksheets("Ledger").Activate

i = GetLastRow() ' Get last row number from function (getlastrow)

Set MyRange = Range("A" & i & ":L" & i) ' Set range to last row

MyRange.Copy Destination:=Worksheets _
("Ledger").Range("A" & i + 1 & ":L" & i + 1)

That works fine (though there could be a better way)

However, if I then copy the same range to a different worksheet, where
the cells on the source range are empty, on the pasted range they
show up as O's

Is there a way to avoid this without having to then cycle through all
of the pasted range clearing the cells with 0's ?

Trevor

 
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
Copying to a range jclandmark Excel Discussion (Misc queries) 0 February 19th 09 03:21 PM
Copying to a flexible range johncpa Excel Discussion (Misc queries) 1 February 9th 08 06:04 PM
Copying a Range Peter[_8_] Excel Discussion (Misc queries) 1 December 11th 07 04:14 AM
copying a named range jenniebentham Excel Discussion (Misc queries) 0 December 20th 06 04:51 PM
Copying a range to another sheet Arlen Excel Discussion (Misc queries) 1 February 3rd 05 12:41 AM


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