Hi all,
I have some code that transfers a range of data but it copies and pastes all the formatting from the original range which I don't want. I've tinkered around a bit with it but can't seem to fit the PasteSpecial function xlPasteValues into the code.Any suggestions????
Here is what I'm using (courtesy of Abi1):
Sub Datatransfer()
Worksheets("DataValues".Activate
Range("Transfer".Select
Selection.Copy
Workbooks.Open FileName:=<filename>
Worksheets("Sheet1".Activate
Range("Test".Cells(1,1).Select
If ActiveCell.Value= "" Then
ElseIf ActiveCell.Offset(1, 0) = "" Then ActiveCell.Offset(1, 0).Select
Else
ActiveCell.End(xlDown).Select
ActiveCell.Offset(1, 0).Select
End If
ActiveSheet.Paste
End Sub
Oh yeah, there's another if anybody can give me a hand with is, this code tests for an empty cell in the range of the sheet to be transferred to but it only checks the first column. I need it two check two or more and I'm not to sure how this code works.
Cheers,
Rob
I have some code that transfers a range of data but it copies and pastes all the formatting from the original range which I don't want. I've tinkered around a bit with it but can't seem to fit the PasteSpecial function xlPasteValues into the code.Any suggestions????
Here is what I'm using (courtesy of Abi1):
Sub Datatransfer()
Worksheets("DataValues".Activate
Range("Transfer".Select
Selection.Copy
Workbooks.Open FileName:=<filename>
Worksheets("Sheet1".Activate
Range("Test".Cells(1,1).Select
If ActiveCell.Value= "" Then
ElseIf ActiveCell.Offset(1, 0) = "" Then ActiveCell.Offset(1, 0).Select
Else
ActiveCell.End(xlDown).Select
ActiveCell.Offset(1, 0).Select
End If
ActiveSheet.Paste
End Sub
Oh yeah, there's another if anybody can give me a hand with is, this code tests for an empty cell in the range of the sheet to be transferred to but it only checks the first column. I need it two check two or more and I'm not to sure how this code works.
Cheers,
Rob