#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default VBA Advise

Hi
I hope if someone can help show me a cleaner way of doing the following
things. I tried the recorder & it comes up with huge code

* Copy a Row e.g Row 5 from sheet 1 to sheet 2 at the end of last row
* Copy a formula from a row/cell to all the way to last row

Thanks in advance for your help


  #2   Report Post  
Posted to microsoft.public.excel.programming
acw acw is offline
external usenet poster
 
Posts: 19
Default VBA Advise

RB

One way.
Copy a row:
Assuming that you are in sheet1 then
Cells(5, 1).EntireRow.Copy Destination:=Sheets
("sheet2").Range("a65536").End(xlUp).Offset(1, 0)

Copy a formula:
Assuming that you are in the cell that you want copied and
that column A has an entry in the last cell that you want
the formula copied down to then:
ActiveCell.Copy Destination:=Range(Cells(ActiveCell.Row,
ActiveCell.Column), Cells(Range("a65536").End(xlUp).Row,
ActiveCell.Column))

Tony
-----Original Message-----
Hi
I hope if someone can help show me a cleaner way of doing

the following
things. I tried the recorder & it comes up with huge code

* Copy a Row e.g Row 5 from sheet 1 to sheet 2 at the end

of last row
* Copy a formula from a row/cell to all the way to last

row

Thanks in advance for your help


.

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
please advise the solution Nilesh Excel Worksheet Functions 3 August 27th 08 02:16 AM
Will pay for need help and occasional advise on using excel .... Jerry in Oklahoma Setting up and Configuration of Excel 1 February 19th 07 02:22 PM
New to VLookUps.... please advise neilcarden Excel Worksheet Functions 4 April 16th 05 06:32 AM
New to VLookUps.... please advise... neilcarden Excel Worksheet Functions 3 April 15th 05 09:22 AM
pls advise George Excel Worksheet Functions 2 February 25th 05 08:22 PM


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