Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default A Complex Mail Merge Question

Hi,
A have a sheet of my Sales Reps and accounts of their Customers. Each
customers record is consisting of one row, having sales rep name and email
in it. At the end of every week, I need to send an email to all reps asking
the updates on open sales/opportunities statuses against their respective
clients accounts. Now the problem is when I use mail merge function, a
single rep is getting multiple emails for different customers accounts. I
want to some up/merge the customers names having open status for a
particular rep and send an email to the rep containing all customers names
in it.
Is there any possibility where I can put all customers having open status
against a particular rep. and then use that list to send out emails?
A sample from my worksheet is:

Name Account Email Status
Asad Ijaz Acc0005 Open
Asad Ijaz Acc0044
Open
Ali Khan Acc0056
Open
James McBride Acc0078
Open
James McBride Acc0034
Open
James McBride Acc0023
Open
Imran Khald Acc0093
Open
John Davis Acc0037
Open
Malik Atique Acc0089
Open
M. Salman Acc0008
Open
Muzafar Sattar Acc0088
Open
Saad Naseem Acc0001
Open
Saddat Sarfraz Acc0002
Open
Saddat Sarfraz Acc0003
Open
Zain Zia Acc0086
Open

I want out put something like this:
Name Account Email Status
Asad Ijaz Acc0005, Acc0044
Open
Ali Khan Acc0056
Open
James McBride Acc0078, Acc0034
Open
Imran Khalid Acc0093

Open
John Davis Acc0037

Open
Malik Atique Acc0089
Open
M. Salman Acc0008
Open
Muzafar Sattar Acc0088
Open
Saad Naseem Acc0001, Acc0002
Open
Zain Zia Acc0086
Open


A rep also might have 1, 2, 3 or n number of accounts.

Please help. I really need this sorted out. This will help me a lots of
manual work and saves my time.

Thanks.

--
Sheikh Saadi
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default A Complex Mail Merge Question

Try this

Sub CombineAcoounts()

RowCount = 2
Do While Range("A" & RowCount) < ""
If Range("A" & RowCount) = Range("A" & (RowCount + 1)) Then
Accounts = Range("B" & RowCount) & ", " & _
Range("B" & (RowCount + 1))
Range("B" & RowCount) = Accounts
Rows(RowCount + 1).Delete
Else
RowCount = RowCount + 1
End If
Loop
End Sub

"Sheikh Saadi" wrote:

Hi,
A have a sheet of my Sales Reps and accounts of their Customers. Each
customers record is consisting of one row, having sales rep name and email
in it. At the end of every week, I need to send an email to all reps asking
the updates on open sales/opportunities statuses against their respective
clients accounts. Now the problem is when I use mail merge function, a
single rep is getting multiple emails for different customers accounts. I
want to some up/merge the customers names having open status for a
particular rep and send an email to the rep containing all customers names
in it.
Is there any possibility where I can put all customers having open status
against a particular rep. and then use that list to send out emails?
A sample from my worksheet is:

Name Account Email Status
Asad Ijaz Acc0005 Open
Asad Ijaz Acc0044
Open
Ali Khan Acc0056
Open
James McBride Acc0078
Open
James McBride Acc0034
Open
James McBride Acc0023
Open
Imran Khald Acc0093
Open
John Davis Acc0037
Open
Malik Atique Acc0089
Open
M. Salman Acc0008
Open
Muzafar Sattar Acc0088
Open
Saad Naseem Acc0001
Open
Saddat Sarfraz Acc0002
Open
Saddat Sarfraz Acc0003
Open
Zain Zia Acc0086
Open

I want out put something like this:
Name Account Email Status
Asad Ijaz Acc0005, Acc0044
Open
Ali Khan Acc0056
Open
James McBride Acc0078, Acc0034
Open
Imran Khalid Acc0093

Open
John Davis Acc0037

Open
Malik Atique Acc0089
Open
M. Salman Acc0008
Open
Muzafar Sattar Acc0088
Open
Saad Naseem Acc0001, Acc0002
Open
Zain Zia Acc0086
Open


A rep also might have 1, 2, 3 or n number of accounts.

Please help. I really need this sorted out. This will help me a lots of
manual work and saves my time.

Thanks.

--
Sheikh Saadi

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 27
Default A Complex Mail Merge Question

Thanks Joel its worked and Ive changed this to support for multiple fields
and fulfill my complete requirements.

Once again thanks a lot.

--
Sheikh Saadi


"Joel" wrote:

Try this

Sub CombineAcoounts()

RowCount = 2
Do While Range("A" & RowCount) < ""
If Range("A" & RowCount) = Range("A" & (RowCount + 1)) Then
Accounts = Range("B" & RowCount) & ", " & _
Range("B" & (RowCount + 1))
Range("B" & RowCount) = Accounts
Rows(RowCount + 1).Delete
Else
RowCount = RowCount + 1
End If
Loop
End Sub

"Sheikh Saadi" wrote:

Hi,
A have a sheet of my Sales Reps and accounts of their Customers. Each
customers record is consisting of one row, having sales rep name and email
in it. At the end of every week, I need to send an email to all reps asking
the updates on open sales/opportunities statuses against their respective
clients accounts. Now the problem is when I use mail merge function, a
single rep is getting multiple emails for different customers accounts. I
want to some up/merge the customers names having open status for a
particular rep and send an email to the rep containing all customers names
in it.
Is there any possibility where I can put all customers having open status
against a particular rep. and then use that list to send out emails?
A sample from my worksheet is:

Name Account Email Status
Asad Ijaz Acc0005 Open
Asad Ijaz Acc0044
Open
Ali Khan Acc0056
Open
James McBride Acc0078
Open
James McBride Acc0034
Open
James McBride Acc0023
Open
Imran Khald Acc0093
Open
John Davis Acc0037
Open
Malik Atique Acc0089
Open
M. Salman Acc0008
Open
Muzafar Sattar Acc0088
Open
Saad Naseem Acc0001
Open
Saddat Sarfraz Acc0002
Open
Saddat Sarfraz Acc0003
Open
Zain Zia Acc0086
Open

I want out put something like this:
Name Account Email Status
Asad Ijaz Acc0005, Acc0044
Open
Ali Khan Acc0056
Open
James McBride Acc0078, Acc0034
Open
Imran Khalid Acc0093

Open
John Davis Acc0037

Open
Malik Atique Acc0089
Open
M. Salman Acc0008
Open
Muzafar Sattar Acc0088
Open
Saad Naseem Acc0001, Acc0002
Open
Zain Zia Acc0086
Open


A rep also might have 1, 2, 3 or n number of accounts.

Please help. I really need this sorted out. This will help me a lots of
manual work and saves my time.

Thanks.

--
Sheikh Saadi

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail merge question BDT Excel Discussion (Misc queries) 0 December 9th 08 09:41 PM
Another Mail Merge Question Dimwit Excel Discussion (Misc queries) 1 December 11th 07 09:31 AM
Question re mail merge and excel sara Excel Discussion (Misc queries) 0 January 17th 07 03:38 AM
Code launches Mail Merge but disables the Mail Merge austris Excel Discussion (Misc queries) 0 October 14th 06 01:11 AM
Mail Merge Question FNORD Excel Discussion (Misc queries) 3 February 9th 05 07:18 PM


All times are GMT +1. The time now is 10:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"