Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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").Paste Special (xlPasteValues) Else Worksheets("CashEntry").Range("$C$2:$P$3").Copy Worksheets("CashTransferRecord").Range("C65000").E nd(xlUp).Offset(1, 0).Cells.PasteSpecial (xlPasteValues) End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I add the new record from another list to current one? | Excel Worksheet Functions | |||
how to add a record to a pivot table | Excel Worksheet Functions | |||
Record Pivot table Macro | Excel Programming | |||
Fetch list of table names in access to a record set | Excel Programming | |||
list box record select | Excel Programming |