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: 34
Default Copy to next blank row

Hi

I have a few cells of data which I need to copy to the next blank row of
another sheet. I can find the row number required by doing this :

Dim Rownumber As Integer
If Range("A20").Value = "" Then Rownumber = 20
If Range("A19").Value = "" Then Rownumber = 19
If Range("A18").Value = "" Then Rownumber = 18
If Range("A17").Value = "" Then Rownumber = 17
If Range("A16").Value = "" Then Rownumber = 16

But I am then having problems with defining the destination to copy to. I
have tried using :

Worksheets("CURRENT").Range("B2").Copy _
Destination:=Worksheets("Balance Order Form").Cells(2, Rownumber)

but I keep getting Runtime Error '1004 ' Application defined or object
defined error, and I don't know what that means or how I should get round it.

Can someone help? Many thanks

Phil
 
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 cells become blank MasterDragon New Users to Excel 1 January 3rd 10 05:37 PM
Copy, next blank row? Richard Excel Worksheet Functions 3 March 26th 08 01:21 AM
COPY A CONCATENATE CELL TO BLANK CELL PUTTING IN THE NEXT BLANK C. QUEST41067 Excel Discussion (Misc queries) 1 January 15th 05 09:29 PM
copy blank cells Vicneswari Murugan Excel Discussion (Misc queries) 1 December 1st 04 02:12 PM
Copy Until Blank Alec Excel Programming 5 October 20th 03 03:38 PM


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