PC Review


Reply
Thread Tools Rate Thread

Copy & Paste Special into first un-populated Row

 
 
=?Utf-8?B?VG9kZEVa?=
Guest
Posts: n/a
 
      28th Nov 2006
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 With Quote
 
 
 
 
=?Utf-8?B?SmltIEphY2tzb24=?=
Guest
Posts: n/a
 
      28th Nov 2006
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!

 
Reply With Quote
 
=?Utf-8?B?SmltIEphY2tzb24=?=
Guest
Posts: n/a
 
      28th Nov 2006
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!

 
Reply With Quote
 
=?Utf-8?B?SmltIEphY2tzb24=?=
Guest
Posts: n/a
 
      28th Nov 2006
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 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
Can't Copy and Paste or Paste Special between Excel Workbooks =?Utf-8?B?d2xsZWU=?= Microsoft Excel Misc 7 2 Days Ago 07:00 AM
Special Copy, Paste Special macro usmc-r70 Microsoft Excel Programming 3 2nd Jul 2009 08:12 AM
HELP - Excel 2003 cut, copy, paste and paste special problems Carrie Microsoft Excel Crashes 2 9th Dec 2008 06:36 PM
Automating copy/paste/paste special when row references change Carl LaFong Microsoft Excel Programming 4 8th Oct 2007 06:10 AM
Dynamic Copy/Paste Special Formulas/Paste Special Values Sharon Perez Microsoft Excel Programming 3 7th Aug 2004 09:49 PM


Features
 

Advertising
 

Newsgroups
 


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