To all the excel master out there,
I have a document and I want to make a sheet that contains all the information that I want to use for mail merge. I can record a Macro to copy the information across but the issue with this is that I end up with lot of blank spaces. I have 8 different sheets to get the information that are labeled A-H. Each contact has two email addresses that are on separate columns that is why I copied the same information over then copied the second lot of email addresses. Here is part of the recorded macro below.
Sub MailMerge()
'
' MailMerge Macro
'
'
Sheets("A").Select
Range("Table2[[Date of Birth]:[Preferred Name]]").Select
Selection.Copy
Sheets("Mail Merge").Select
Range("A2").Select
ActiveSheet.Paste
Sheets("A").Select
Range("Table2[Gender]").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Mail Merge").Select
Range("E2").Select
ActiveSheet.Paste
Range("F2").Select
Sheets("A").Select
Range("Table2[1st Email]").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Mail Merge").Select
ActiveSheet.Paste
Sheets("A").Select
Range("Table2[[Column1]:[E City Password]]").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Mail Merge").Select
Range("G2").Select
ActiveSheet.Paste
Range("A2:N31").Select
Application.CutCopyMode = False
Selection.Copy
Range("A32").Select
ActiveSheet.Paste
Range("E39").Select
Sheets("A").Select
Range("Table2[2nd Email]").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Mail Merge").Select
Range("F32").Select
ActiveSheet.Paste
Range("A62").Select
Sheets("B").Select
Range("Table3[[Date of Birth]:[Preferred Name]]").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Mail Merge").Select
ActiveSheet.Paste
Sheets("B").Select
Range("Table3[Gender]").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Mail Merge").Select
Range("E62").Select
ActiveSheet.Paste
Sheets("B").Select
Range("Table3[1st Email]").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Mail Merge").Select
Range("F62").Select
ActiveSheet.Paste
Sheets("Mail Merge").Select
Range("G62").Select
Sheets("B").Select
Range("Y2:AF23").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Mail Merge").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A62:N91").Select
Application.CutCopyMode = False
Selection.Copy
Range("A92").Select
ActiveSheet.Paste
Range("F92").Select
Sheets("B").Select
Range("Table3[2nd Email]").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Mail Merge").Select
ActiveSheet.Paste
Range("G116").Select
End Sub
Any suggestions welcome.
Thank you
I have a document and I want to make a sheet that contains all the information that I want to use for mail merge. I can record a Macro to copy the information across but the issue with this is that I end up with lot of blank spaces. I have 8 different sheets to get the information that are labeled A-H. Each contact has two email addresses that are on separate columns that is why I copied the same information over then copied the second lot of email addresses. Here is part of the recorded macro below.
Sub MailMerge()
'
' MailMerge Macro
'
'
Sheets("A").Select
Range("Table2[[Date of Birth]:[Preferred Name]]").Select
Selection.Copy
Sheets("Mail Merge").Select
Range("A2").Select
ActiveSheet.Paste
Sheets("A").Select
Range("Table2[Gender]").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Mail Merge").Select
Range("E2").Select
ActiveSheet.Paste
Range("F2").Select
Sheets("A").Select
Range("Table2[1st Email]").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Mail Merge").Select
ActiveSheet.Paste
Sheets("A").Select
Range("Table2[[Column1]:[E City Password]]").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Mail Merge").Select
Range("G2").Select
ActiveSheet.Paste
Range("A2:N31").Select
Application.CutCopyMode = False
Selection.Copy
Range("A32").Select
ActiveSheet.Paste
Range("E39").Select
Sheets("A").Select
Range("Table2[2nd Email]").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Mail Merge").Select
Range("F32").Select
ActiveSheet.Paste
Range("A62").Select
Sheets("B").Select
Range("Table3[[Date of Birth]:[Preferred Name]]").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Mail Merge").Select
ActiveSheet.Paste
Sheets("B").Select
Range("Table3[Gender]").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Mail Merge").Select
Range("E62").Select
ActiveSheet.Paste
Sheets("B").Select
Range("Table3[1st Email]").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Mail Merge").Select
Range("F62").Select
ActiveSheet.Paste
Sheets("Mail Merge").Select
Range("G62").Select
Sheets("B").Select
Range("Y2:AF23").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Mail Merge").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A62:N91").Select
Application.CutCopyMode = False
Selection.Copy
Range("A92").Select
ActiveSheet.Paste
Range("F92").Select
Sheets("B").Select
Range("Table3[2nd Email]").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Mail Merge").Select
ActiveSheet.Paste
Range("G116").Select
End Sub
Any suggestions welcome.
Thank you