Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying data to another workbook
I would like a user to enter data to a workbook without directly accessing
that workbook. In another workbook I have created in cells a1:f1 I have a formulas that result in a cell references (these are variable), but for example say A1 = $BT$150, $BU$150 etc. I would like the value from cells a2 through f2 to go to Target workbook $BT$150, $BU$150 etc Thank you |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying data to another workbook
Hi
Assuming that target cells will always be next to each other, this should do it: Sub CopyToOtherWB() Dim TargetWb As Workbook Dim TargetSh As Worksheet Dim CopyFrom As Range Dim DestCell As String Dim InputSh As Worksheet Set TargetWb = Workbooks("Book2.xls") ' Change to suit Set TargetSh = TargetWb.Worksheets("Sheet1") Set InputSh = ThisWorkbook.Sheets("Sheet1") ' Change to suit Set CopyFrom = InputSh.Range("A2:F2") DestCell = InputSh.Range("A1").Value CopyFrom.Copy Destination:=TargetSh.Range(DestCell) End Sub Best regards, Per "Steve" skrev i meddelelsen ... I would like a user to enter data to a workbook without directly accessing that workbook. In another workbook I have created in cells a1:f1 I have a formulas that result in a cell references (these are variable), but for example say A1 = $BT$150, $BU$150 etc. I would like the value from cells a2 through f2 to go to Target workbook $BT$150, $BU$150 etc Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copying data from one workbook to another | New Users to Excel | |||
Copying Data from one workbook to another | Excel Programming | |||
Copying data from workbook/sheets to another workbook/sheet | Excel Programming | |||
loop through a column on a workbook copying data on each row to another workbook, then copy data back to the original workbook | Excel Programming | |||
copying data from one workbook to another | Excel Discussion (Misc queries) |