View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Decreenisi[_2_] Decreenisi[_2_] is offline
external usenet poster
 
Posts: 7
Default Filtering information

On 8 Oct, 11:56, OssieMac wrote:
Hi Duncan,

Not sure that I have interpreted your question correctly because it appears
to be just duplicating the data. However, the following copies data from a
single row at the active cell in the active sheet and Pastes Special to the
Data Log sheet.

I have assumed that you have column headers in the Data Log sheet and they
are similar to the Input Data sheet.

Note the comments. Note also that a space and underscore at the end of a
line is a line break in an otherwise single line of code.

Ensure that you backup your workbook before running the code in case it does
not do what you expect.

Sub CopyData()
Dim wsDataLog As Worksheet

Set wsDataLog = Sheets("Data Log")

'On Input Data sheet at the activecell row, _
*copy the range from column A to column G
ActiveSheet.Range(Cells(ActiveCell.Row, "A"), _
* * * * Cells(ActiveCell.Row, "G")).Copy

'Find the blank row at the bottom of _
*existing data in Data Log and PasteSpecial, values
With wsDataLog
* * .Cells(.Rows.Count, "A").End(xlUp) _
* * * * .Offset(1, 0).PasteSpecial _
* * * * Paste:=xlPasteValues
End With

End Sub

--
Regards,

OssieMac


Thanks, that's just what I needed.

Dun.