Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need simple macro to copy and paste values
I need to write a macro to copy 2 total cells from the bottom of one sheet
and paste those values into cells on another sheet. The total cells on "sheet 1" are in Columns C and D and are one row below the last data in columns A & B. Also, there will be a varying number of rows on "sheet 1" at different times. The cells on "sheet 2" that I need to paste the values in are D2 and E2. This is actually going to be an addition to a current macro that I have started, but I can't get this simple task to work. :( |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need simple macro to copy and paste values
This assumes that there is no data in columns A & B below
the Total line. Sub sl() Dim lr As Long lr = Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row Range("A" & lr & ":B" & lr).Copy Sheets("Sheet2").Range("D2") End Sub "Bern Notice" wrote in message ... I need to write a macro to copy 2 total cells from the bottom of one sheet and paste those values into cells on another sheet. The total cells on "sheet 1" are in Columns C and D and are one row below the last data in columns A & B. Also, there will be a varying number of rows on "sheet 1" at different times. The cells on "sheet 2" that I need to paste the values in are D2 and E2. This is actually going to be an addition to a current macro that I have started, but I can't get this simple task to work. :( |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Simple Macro - I think... Copy - Paste on Click | Excel Discussion (Misc queries) | |||
simple copy paste multiple range macro ARGUMENT ERROR | Excel Programming | |||
Macro for copy and paste values | Excel Discussion (Misc queries) | |||
How to write a simple copy-paste macro? | New Users to Excel | |||
Macro newbie - simple copy/paste function | Excel Programming |