Mahesh: Why do I need code in module 1 and module 2? Does it work in hand with the sub procedure in sheet1?
On Mar 19, 6:59 am, Mahesh parab <mahes...@gmail.com> wrote: > Hi Kevin > > Please find attach sheet, hope this is what u want. > > Right Click on sheet1 tab & view code change this as per your requirement > > Private Sub Worksheet_Change(ByVal Target As Range) > If Not (Application.Intersect(Worksheets("Sheet1").Range("B:B"), Target) > Is Nothing) Then > DoSort > End If > End Sub > Private Sub DoSort() > Worksheets("Sheet1").Range("A:Z").Sort > Key1:=Worksheets("Sheet1").Range("B1"), Order1:=xlDescending, Header:=xlYes > End Sub > > > > On Fri, Mar 19, 2010 at 7:43 AM, KevinM <kmiy...@gmail.com> wrote: > > I want to create an email when the value in column A changes. In > > column A I have the email addresses of managers. When the email > > address changes I want the VBA to compose the email and get the > > employees names in column B assoicated to that email address. I > > don't > > want it 1 for 1. I want to take only that one email address and > > bring > > in that range of employees in to the email. So in the example below > > I > > want to email manag...@domain.com and have employees 1,2,and 3 in the > > body of the email. I don't want seperate emails for each employee > > going to the manager. Thanks > > > Example: > > Column A Column B > > manag...@domain.com employee1 > > manag...@domain.com employee2 > > manag...@domain.com employee3 > > manag...@domain.com employee4 > > manag...@domain.com employee5 > > > -- > > > ---------------------------------------------------------------------------------- > > Some important links for excel users: > > 1. Follow us on TWITTER for tips tricks and links : > >http://twitter.com/exceldailytip > > 2. Join our Facebook Group @ > >http://www.facebook.com/group.php?gid=287779555678 > > 3. Excel tutorials athttp://www.excel-macros.blogspot.com > > 4. Learn VBA Macros athttp://www.quickvba.blogspot.com > > 5. Excel Tips and Tricks athttp://exceldailytip.blogspot.com > > > To post to this group, send email to excel-macros@googlegroups.com > > > <><><><><><><><><><><><><><><><><><><><><><> > > HELP US GROW !! > > > We reach over 6,800 subscribers worldwide and receive many nice notes about > > the learning and support from the group.Let friends and co-workers know they > > can subscribe to group at > >http://groups.google.com/group/excel-macros/subscribe > > > To unsubscribe from this group, send email to excel-macros+ > > unsubscribegooglegroups.com or reply to this email with the words "REMOVE > > ME" as the subject. > > > > sample file.xls > 70KViewDownload- Hide quoted text - > > - Show quoted text - -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our Facebook Group @ http://www.facebook.com/group.php?gid=287779555678 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 6,800 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe To unsubscribe from this group, send email to excel-macros+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.