Generate ongoing database of results via Macro
Oops. You wanted column C-3. So it is 2,3 as shown here....
Sub Doit()
Sheets("CashTransferRecord").Select
If Cells(2, 3).Value = Empty Then
Worksheets("Sheet1").Range("$A$2:$P$3").Copy
Worksheets("CashTransferRecord").Range("a2").Paste Special (xlPasteValues)
Else
Worksheets("Sheet1").Range("$A$2:$P$3").Copy
Worksheets("CashTransferRecord").Range("A65000").E nd(xlUp).Offset(1,0).Cells.PasteSpecial (xlPasteValues)
End If
End Sub
"Brice" wrote:
thanks everyone...it almost works now!
one hiccup...
I keep the cells in columns A & B on "CashTransferRecord usually blank so
the macro doesn't add a new record each time. can this be fixed so it looks
to column C to check if cells are empty or not in order to add record/data to
the bottom of sheet?
Thanks so much! - Brice
"Mike H." wrote:
Actually you'd have to do this because of your requirement to have the data
start on row 2 if you're just starting out. And the offset # was wrong, sb 1
not 2. HTH
Sub Doit()
Sheets("CashTransferRecord").Select
If Cells(2, 1).Value = Empty Then
Worksheets("Sheet1").Range("$A$2:$P$3").Copy
Worksheets("CashTransferRecord").Range("a2").Paste Special (xlPasteValues)
Else
Worksheets("Sheet1").Range("$A$2:$P$3").Copy
Worksheets("CashTransferRecord").Range("A65000").E nd(xlUp).Offset(1,
0).Cells.PasteSpecial (xlPasteValues)
End If
End Sub
|