mail merge

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can I do a mail merge from one excel document to another? I want to have a
name at the top of each page that is different from the previous/next page.
I have the names as a list on another spreadsheet.
 
Hello,

Can you explain in more detail what you want as the end result, it's
hard to understand what you want.


Thx,
JP
 
I have an excel document that is an inventory list. I have people in 300
rooms that need to complete the inventory list. I would like to put in one
cell the name of the person and the room #. i.e J Smith 5670 then on the
next sheet M. Jones 5690 etc. Rather than type in each name and room, I
hope to merge this information from another document.
 
I think I understand. You want to create a workbook with a different
worksheet for each name. Something like this should work.

Let's say you have the names in column A, starting in A1:

Sub addsheets()
Dim X as Long
Dim i as Long

X = Activesheet.usedrange.rows.count

For i = 1 to X
Worksheets.Add(After:=Worksheets(Worksheets.count)).Name = Cells(i,1)
Next i

End Sub

I didn't test this code. Note that there may be a limit to the number
of sheets in a workbook, you may not be able to create 300 worksheets.


HTH,
JP
 
Thank you. I'll give it a try

JP said:
I think I understand. You want to create a workbook with a different
worksheet for each name. Something like this should work.

Let's say you have the names in column A, starting in A1:

.Sub addsheets()
Dim X as Long
Dim i as Long

X = Activesheet.usedrange.rows.count

For i = 1 to X
Worksheets.Add(After:=Worksheets(Worksheets.count)).Name = Cells(i,1)
Next i

End Sub

I didn't test this code. Note that there may be a limit to the number
of sheets in a workbook, you may not be able to create 300 worksheets.


HTH,
JP
 
Back
Top