B
Brice
I currently have (script below) macro which adds a record (from "CashEntry"
sheet, cells $C$2:$P$3) to the bottom of a list (on another sheet
""CashTransferRecord") .
My Request: I would now like the ability to add the record to one of four
different sheets (instead of solely the "CashTransferRecord") based on a
Variables Table (see below). So, the macro will identify the Name located in
'CashEntry" cell G2, then add the record to bottom of list onto the
appropriate Sheet Name.
Variables Table:
Names Sheet Name
Robert RobertCash
Dilbert DilbertCash
Q-Bert Q-BertCash
Eggbert EggbertCash
__________________________________
Sub CopyPasteOntoDatabase()
Sheets("CashTransferRecord").Select
If Cells(2, 3).Value = Empty Then
Worksheets("CashEntry").Range("$C$2:$P$3").Copy
Worksheets("CashTransferRecord").Range("C2").PasteSpecial (xlPasteValues)
Else
Worksheets("CashEntry").Range("$C$2:$P$3").Copy
Worksheets("CashTransferRecord").Range("C65000").End(xlUp).Offset(1,
0).Cells.PasteSpecial (xlPasteValues)
End If
End Sub
sheet, cells $C$2:$P$3) to the bottom of a list (on another sheet
""CashTransferRecord") .
My Request: I would now like the ability to add the record to one of four
different sheets (instead of solely the "CashTransferRecord") based on a
Variables Table (see below). So, the macro will identify the Name located in
'CashEntry" cell G2, then add the record to bottom of list onto the
appropriate Sheet Name.
Variables Table:
Names Sheet Name
Robert RobertCash
Dilbert DilbertCash
Q-Bert Q-BertCash
Eggbert EggbertCash
__________________________________
Sub CopyPasteOntoDatabase()
Sheets("CashTransferRecord").Select
If Cells(2, 3).Value = Empty Then
Worksheets("CashEntry").Range("$C$2:$P$3").Copy
Worksheets("CashTransferRecord").Range("C2").PasteSpecial (xlPasteValues)
Else
Worksheets("CashEntry").Range("$C$2:$P$3").Copy
Worksheets("CashTransferRecord").Range("C65000").End(xlUp).Offset(1,
0).Cells.PasteSpecial (xlPasteValues)
End If
End Sub