Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, I've spent hours trying to work this out and I can't get it. I nee some help to copy a value and grid location into a table in anothe worksheet. For example, in one worksheet I have in one cell, the tabl location (i.e C3), and in another cell a number (ie. 1234). On a secon sheet, I have a table and I would like it to copy 1234 into tabl location, C3. Note, on the first sheet the number and table locatio values are changing (table location is a manual input). Eventually, would enter many grid locations in sheet1 and a corresponding valu appears in the second cell and then I would like a macro that will fil in the table in sheet2. Eg. Sheet1 Sheet2 A B C A B C 1 C3 1 2 1234 2 3 3 (wan 1234 to copy here) 4 4 5 5 Thanks in advance! Trevo -- Tre_coo ----------------------------------------------------------------------- Tre_cool's Profile: http://www.excelforum.com/member.php...fo&userid=2641 View this thread: http://www.excelforum.com/showthread.php?threadid=44109 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub UpdateTable()
Dim rng as Range, cell as Range With Worksheets("sheet1") set rng = .Range(.Cells(1,1),.Cells(1,1).End(xldown)) End With for each cell in rng worksheets("Sheet2").Range(cell.Value).value = _ cell.offset(0,1).Value Next End Sub -- Regards, Tom Ogilvy "Tre_cool" wrote in message ... Hi, I've spent hours trying to work this out and I can't get it. I need some help to copy a value and grid location into a table in another worksheet. For example, in one worksheet I have in one cell, the table location (i.e C3), and in another cell a number (ie. 1234). On a second sheet, I have a table and I would like it to copy 1234 into table location, C3. Note, on the first sheet the number and table location values are changing (table location is a manual input). Eventually, I would enter many grid locations in sheet1 and a corresponding value appears in the second cell and then I would like a macro that will fill in the table in sheet2. Eg. Sheet1 Sheet2 A B C A B C 1 C3 1 2 1234 2 3 3 (want 1234 to copy here) 4 4 5 5 Thanks in advance! Trevor -- Tre_cool ------------------------------------------------------------------------ Tre_cool's Profile: http://www.excelforum.com/member.php...o&userid=26416 View this thread: http://www.excelforum.com/showthread...hreadid=441098 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks Tom...it almost worked, but I'm getting a run-time error in the line, worksheets("Sheet2").Range(cell.Value).value = cell.offset(0,1).Value I don't want it to loop down cells in sheet1 just the pair of cells telling it, which cell to put it into table and the value. Eg. C4 12345 Thanks -- Tre_cool ------------------------------------------------------------------------ Tre_cool's Profile: http://www.excelforum.com/member.php...o&userid=26416 View this thread: http://www.excelforum.com/showthread...hreadid=441098 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copying Table from one Sheet to Another | Excel Discussion (Misc queries) | |||
Copying a table from Word | Excel Discussion (Misc queries) | |||
Copying pivot table | Excel Discussion (Misc queries) | |||
Copying values from pivot table to cells outside pivot table | Excel Discussion (Misc queries) | |||
copying format of a table | Excel Worksheet Functions |