PC Review


Reply
Thread Tools Rate Thread

Please help to get this MACRO worked!

 
 
Excel_Newbie
Guest
Posts: n/a
 
      18th Nov 2005

I am trying to copy result from a pivot table to one worksheet. The
worksheet that I have to copy data to already have existing data in it.


I have the Macro below but just have the code to copy the values from
the pivot table to the worksheet but don't know how to look for the
last empty row to append the data to.

Would any of you please help me to find the first emty cell on Sheet2
before I can copy data to it?

Thanks!

******************************************
Sub Auto_Open()
Dim FilterRange As Range

Range("A42:G56").Copy
Worksheets("Sheet2").Range("This need to be the first empty
rcell").PasteSpecial Paste:=xlPasteValues

End Sub


--
Excel_Newbie
------------------------------------------------------------------------
Excel_Newbie's Profile: http://www.excelforum.com/member.php...o&userid=28861
View this thread: http://www.excelforum.com/showthread...hreadid=486417

 
Reply With Quote
 
 
 
 
cliodne
Guest
Posts: n/a
 
      18th Nov 2005

oh yay! a question I can answer! *is excited*

Do While ActiveCell <> ""
N = N + 1
ActiveCell.Offset(1, 0).Select
Loop

This will give you the number it takes ot get to an empty cell. =)


--
cliodne
------------------------------------------------------------------------
cliodne's Profile: http://www.excelforum.com/member.php...o&userid=28774
View this thread: http://www.excelforum.com/showthread...hreadid=486417

 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      18th Nov 2005
Sub Auto_Open()
Dim FilterRange As Range

Range("A42:G56").Copy
Worksheets("Sheet2").Range("A1").End(xlDown).PasteSpecial
Paste:=xlPasteValues

End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Excel_Newbie" <(E-Mail Removed)>
wrote in message
news:(E-Mail Removed)...
>
> I am trying to copy result from a pivot table to one worksheet. The
> worksheet that I have to copy data to already have existing data in it.
>
>
> I have the Macro below but just have the code to copy the values from
> the pivot table to the worksheet but don't know how to look for the
> last empty row to append the data to.
>
> Would any of you please help me to find the first emty cell on Sheet2
> before I can copy data to it?
>
> Thanks!
>
> ******************************************
> Sub Auto_Open()
> Dim FilterRange As Range
>
> Range("A42:G56").Copy
> Worksheets("Sheet2").Range("This need to be the first empty
> rcell").PasteSpecial Paste:=xlPasteValues
>
> End Sub
>
>
> --
> Excel_Newbie
> ------------------------------------------------------------------------
> Excel_Newbie's Profile:

http://www.excelforum.com/member.php...o&userid=28861
> View this thread: http://www.excelforum.com/showthread...hreadid=486417
>



 
Reply With Quote
 
=?Utf-8?B?Um9va2llIDFzdCBjbGFzcw==?=
Guest
Posts: n/a
 
      19th Nov 2005
Consider
Private Sub Workbook_Open()
instead of
Auto_Open
Both serve same purpose but Auto_Open is an older of VB
Lou

"Bob Phillips" wrote:

> Sub Auto_Open()
> Dim FilterRange As Range
>
> Range("A42:G56").Copy
> Worksheets("Sheet2").Range("A1").End(xlDown).PasteSpecial
> Paste:=xlPasteValues
>
> End Sub
>
> --
>
> HTH
>
> RP
> (remove nothere from the email address if mailing direct)
>
>
> "Excel_Newbie" <(E-Mail Removed)>
> wrote in message
> news:(E-Mail Removed)...
> >
> > I am trying to copy result from a pivot table to one worksheet. The
> > worksheet that I have to copy data to already have existing data in it.
> >
> >
> > I have the Macro below but just have the code to copy the values from
> > the pivot table to the worksheet but don't know how to look for the
> > last empty row to append the data to.
> >
> > Would any of you please help me to find the first emty cell on Sheet2
> > before I can copy data to it?
> >
> > Thanks!
> >
> > ******************************************
> > Sub Auto_Open()
> > Dim FilterRange As Range
> >
> > Range("A42:G56").Copy
> > Worksheets("Sheet2").Range("This need to be the first empty
> > rcell").PasteSpecial Paste:=xlPasteValues
> >
> > End Sub
> >
> >
> > --
> > Excel_Newbie
> > ------------------------------------------------------------------------
> > Excel_Newbie's Profile:

> http://www.excelforum.com/member.php...o&userid=28861
> > View this thread: http://www.excelforum.com/showthread...hreadid=486417
> >

>
>
>

 
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
cant install vista im going crazy please help please please please =?Utf-8?B?TWFuTmVlZEhlbHA=?= Windows Vista Installation 2 31st Jul 2006 02:55 PM
cant install vista im going crazy please help please please please =?Utf-8?B?TWFuTmVlZEhlbHA=?= Windows Vista Installation 2 30th Jul 2006 09:31 PM
Help! Anyone! Please Please Please Please Please Please =?Utf-8?B?UmFuZHk=?= Microsoft Access Macros 2 17th May 2004 07:16 PM
Help! Help! Help! Help! Help! Help! Help! Help! Help! Help! Help! Help! Help! -$- Windows XP Internet Explorer 2 21st Dec 2003 11:45 PM
macro please please please help Leigh-Ann Microsoft Excel Worksheet Functions 3 19th Aug 2003 03:26 PM


Features
 

Advertising
 

Newsgroups
 


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