Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
adding rows, pasting values then empty sheet
Hi:
If I import a report weekly (and therefore though it has the same columns - 5, the row number varies) onto a worksheet "synergy". How can I move all this to the worksheet "lifetime" (same workbook) at the next available row at the bottom of the table located in "lifetime". With the values still intacted (colums include date and numbers). then erase the synergy worksheet ready for the nexts weeks update? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
adding rows, pasting values then empty sheet
Try
'Replace Sheet1 by Synergy and Sheet2 by Lifetime everywhere... Sub CopyRow() Dim Answer As String Dim LastRowOnSheet1, LastRowOnSheet2 As Long With Worksheets("Sheet1") LastRowOnSheet1 = .Cells(.Rows.Count, "A").End(xlUp).Row End With If LastRowOnSheet1 = 1 Then MsgBox "Nothing to Copy" With Worksheets("Sheet2") LastRowOnSheet2 = .Cells(.Rows.Count, "A").End(xlUp).Row If LastRowOnSheet2 = 1 And .Cells(1, "A").Value = "" Then LastRowOnSheet2 = 0 End If 'Answer = InputBox("Find which number in Row H and copy it?") Worksheets("Sheet1").UsedRange. _ Copy .Range("A" & (LastRowOnSheet2 + 1)) End With Worksheets("Sheet1").UsedRange.ClearContents End Sub "misscharliebrown" wrote: Hi: If I import a report weekly (and therefore though it has the same columns - 5, the row number varies) onto a worksheet "synergy". How can I move all this to the worksheet "lifetime" (same workbook) at the next available row at the bottom of the table located in "lifetime". With the values still intacted (colums include date and numbers). then erase the synergy worksheet ready for the nexts weeks update? |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
adding rows, pasting values then empty sheet
thank you so much.. that was some sweet code
"Sheeloo" wrote: Try 'Replace Sheet1 by Synergy and Sheet2 by Lifetime everywhere... Sub CopyRow() Dim Answer As String Dim LastRowOnSheet1, LastRowOnSheet2 As Long With Worksheets("Sheet1") LastRowOnSheet1 = .Cells(.Rows.Count, "A").End(xlUp).Row End With If LastRowOnSheet1 = 1 Then MsgBox "Nothing to Copy" With Worksheets("Sheet2") LastRowOnSheet2 = .Cells(.Rows.Count, "A").End(xlUp).Row If LastRowOnSheet2 = 1 And .Cells(1, "A").Value = "" Then LastRowOnSheet2 = 0 End If 'Answer = InputBox("Find which number in Row H and copy it?") Worksheets("Sheet1").UsedRange. _ Copy .Range("A" & (LastRowOnSheet2 + 1)) End With Worksheets("Sheet1").UsedRange.ClearContents End Sub "misscharliebrown" wrote: Hi: If I import a report weekly (and therefore though it has the same columns - 5, the row number varies) onto a worksheet "synergy". How can I move all this to the worksheet "lifetime" (same workbook) at the next available row at the bottom of the table located in "lifetime". With the values still intacted (colums include date and numbers). then erase the synergy worksheet ready for the nexts weeks update? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding some values on a sheet??? | New Users to Excel | |||
How to Delete empty rows in excel in b/w rows with values | Excel Worksheet Functions | |||
Cut filtered rows, paste into next empty row of new sheet, and delete cut rows | Excel Worksheet Functions | |||
cutting and pasting rows from one sheet to another generates error | Excel Discussion (Misc queries) | |||
Adding Rows to Master Sheet | New Users to Excel |