create list from another worksheet

B

Benjamin

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?
 
D

Don Guillett

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
 
B

Benjamin

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.
 
D

Don Guillett

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.
 
B

Benjamin

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top