Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 60
Default Copy & Paste Special into first un-populated Row

Please help!
I am trying to do a number of different things in a single macro and can't
seem to make it work.

1) I need to copy a data range (that vaies in length and width) that begins
in cell B20 in Sheet 1.
2) The copied data then needs to be pasted (as values) into Sheet 2 into the
first available row in column A. ...by first available row, I mean the the
first row that does not contain data.
3) The original copied data (from #1) needs to be cleared, but the formulas
must remain.

Any assitance would be greatly appreciated!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default Copy & Paste Special into first un-populated Row

dim rng as Range
Set rng = .Range(.Cells(65536,1),.Cells(65536,1)).End (xlUp)
rng.Select

This should give the first available cell in Column A.
--
Best wishes,

Jim


"ToddEZ" wrote:

Please help!
I am trying to do a number of different things in a single macro and can't
seem to make it work.

1) I need to copy a data range (that vaies in length and width) that begins
in cell B20 in Sheet 1.
2) The copied data then needs to be pasted (as values) into Sheet 2 into the
first available row in column A. ...by first available row, I mean the the
first row that does not contain data.
3) The original copied data (from #1) needs to be cleared, but the formulas
must remain.

Any assitance would be greatly appreciated!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default Copy & Paste Special into first un-populated Row

I left out an important part.

With Cells
dim rng as Range
Set rng = .Range(.Cells(65536,1),.Cells(65536,1)).End (xlUp)
rng.Select
End With

--
Best wishes,

Jim


"ToddEZ" wrote:

Please help!
I am trying to do a number of different things in a single macro and can't
seem to make it work.

1) I need to copy a data range (that vaies in length and width) that begins
in cell B20 in Sheet 1.
2) The copied data then needs to be pasted (as values) into Sheet 2 into the
first available row in column A. ...by first available row, I mean the the
first row that does not contain data.
3) The original copied data (from #1) needs to be cleared, but the formulas
must remain.

Any assitance would be greatly appreciated!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default Copy & Paste Special into first un-populated Row

Now that I have "digested" the entire message:

1.
dim rng as Range
With Cells
Set rng1 = .Range(.Cells(20, 2), .Cells(20, 2).End(xlDown))
Set rng2 = .Range(.Cells(20, 2), .Cells(20, 2).End(xlToRight))
Set rng = Range(rng1, rng2)
rng.Select
Selection.Copy


2.
Sheets("Sheet2").activate
dim rng as Range
Set rng = .Range(.Cells(65536,1),.Cells(65536,1)).End (xlUp)
rng.Select
End With

3.

I'm not clear on what you need here.


--
Best wishes,

Jim


"ToddEZ" wrote:

Please help!
I am trying to do a number of different things in a single macro and can't
seem to make it work.

1) I need to copy a data range (that vaies in length and width) that begins
in cell B20 in Sheet 1.
2) The copied data then needs to be pasted (as values) into Sheet 2 into the
first available row in column A. ...by first available row, I mean the the
first row that does not contain data.
3) The original copied data (from #1) needs to be cleared, but the formulas
must remain.

Any assitance would be greatly appreciated!

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
Can't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
Copy; Paste; Paste Special are disabled Mack Neff[_3_] Excel Discussion (Misc queries) 0 April 28th 08 06:29 PM
help w/ generic copy & paste/paste special routine DavidH[_2_] Excel Programming 5 January 23rd 06 03:58 AM
Copy - Paste Special DejaVu Excel Discussion (Misc queries) 2 June 15th 05 06:32 PM
Dynamic Copy/Paste Special Formulas/Paste Special Values Sharon Perez Excel Programming 3 August 7th 04 09:49 PM


All times are GMT +1. The time now is 02:16 AM.

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"