Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a worksheet with 2 columns of data that changes each day. I am
looking for a way to link / copy a certain row from the first worksheet to another worksheet on a daily basis -- I would need to do this with numerous rows into numerous worksheet. Example: bob 5 jim 6 frank 2 I need to link / copy (jim, 6) to worksheet jim. Each day I would like the newest row to appear at the top, and all the older data to move down a row. Can someone help me with the copying / links and moving the data down using a non-manual method? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try this
Sub copyalltotheirsheets() For Each c In Range("a2:a" & Cells(Rows.Count, "a").End(xlUp).Row) With Sheets(CStr(c)) .Rows(2).Insert c.Resize(, 2).Copy .Range("a2") End With Next c End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Benjamin" wrote in message ... I have a worksheet with 2 columns of data that changes each day. I am looking for a way to link / copy a certain row from the first worksheet to another worksheet on a daily basis -- I would need to do this with numerous rows into numerous worksheet. Example: bob 5 jim 6 frank 2 I need to link / copy (jim, 6) to worksheet jim. Each day I would like the newest row to appear at the top, and all the older data to move down a row. Can someone help me with the copying / links and moving the data down using a non-manual method? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Assumes your list starting at row 2 of the workbook and worksheet you are on when the macro is fired. Put in a regular module of the activeworkbook. -- Don Guillett Microsoft MVP Excel SalesAid Software "Benjamin" wrote in message ... I'm new to code. Should I be inserting something in this? Which worksheet / book does it belong in? I am getting a Runtime Error "9" Subscript out of Range. "Don Guillett" wrote: Try this Sub copyalltotheirsheets() For Each c In Range("a2:a" & Cells(Rows.Count, "a").End(xlUp).Row) With Sheets(CStr(c)) .Rows(2).Insert c.Resize(, 2).Copy .Range("a2") End With Next c End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Benjamin" wrote in message ... I have a worksheet with 2 columns of data that changes each day. I am looking for a way to link / copy a certain row from the first worksheet to another worksheet on a daily basis -- I would need to do this with numerous rows into numerous worksheet. Example: bob 5 jim 6 frank 2 I need to link / copy (jim, 6) to worksheet jim. Each day I would like the newest row to appear at the top, and all the older data to move down a row. Can someone help me with the copying / links and moving the data down using a non-manual method? |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
OK. This works. Some more questions... The initial workbook will be new
everyday, and the copied rows will go into a different workbook. Where would I put the code in this case? I assume I would need to identify the workbook names in the code too? "Don Guillett" wrote: Assumes your list starting at row 2 of the workbook and worksheet you are on when the macro is fired. Put in a regular module of the activeworkbook. -- Don Guillett Microsoft MVP Excel SalesAid Software "Benjamin" wrote in message ... I'm new to code. Should I be inserting something in this? Which worksheet / book does it belong in? I am getting a Runtime Error "9" Subscript out of Range. "Don Guillett" wrote: Try this Sub copyalltotheirsheets() For Each c In Range("a2:a" & Cells(Rows.Count, "a").End(xlUp).Row) With Sheets(CStr(c)) .Rows(2).Insert c.Resize(, 2).Copy .Range("a2") End With Next c End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Benjamin" wrote in message ... I have a worksheet with 2 columns of data that changes each day. I am looking for a way to link / copy a certain row from the first worksheet to another worksheet on a daily basis -- I would need to do this with numerous rows into numerous worksheet. Example: bob 5 jim 6 frank 2 I need to link / copy (jim, 6) to worksheet jim. Each day I would like the newest row to appear at the top, and all the older data to move down a row. Can someone help me with the copying / links and moving the data down using a non-manual method? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I create a worksheet using a drop down list? | Excel Worksheet Functions | |||
create a list base on another worksheet | Excel Discussion (Misc queries) | |||
Create a list in one worksheet of the other worksheets' names | Excel Worksheet Functions | |||
How can Excel create a list of tabs on a worksheet? | Excel Discussion (Misc queries) | |||
How do I create a validation list on a separate worksheet? | Excel Worksheet Functions |