Re: $$Excel-Macros$$ create email when value in cell changes
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.
$$Excel-Macros$$ create email when value in cell changes
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 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.
$$Excel-Macros$$ variable not working
I'm new to VBA and created this code. Its working but when I attempt to assign a variable then it doesn't calculate. Here is a snippit of the code. The variable is 'paycode12'. When I just have it as Cells (j, 12).Formula = Cells(j, 7) * Cells(j, 11) this format it works fine. Any help is appreciated. KevinM Sub calculate_retropay() Dim paycode12 As Integer Dim paycode13 As Integer Dim paycode1E As Integer Dim paycode1H As Integer Dim paycode1I As Integer Dim paycode1J As Integer 'this will search for the pay period in column C Enterpp = InputBox(Please enter the period number ie 2008-21-0) finalrow = Cells(65536, 3).End(xlUp).Row finalrow1 = Cells(65536, 6).End(xlUp).Row For i = 1 To finalrow For j = 1 To finalrow1 'takes the value of what pay period is keyed in If Cells(i, 3).Value = Enterpp Then 'if paycode =1 then take the new rate * by hours If Cells(j, 6).Value = 1 Then Cells(j, 12).Formula = Cells(j, 7) * Cells(j, 11) Else 'if paycode =12 then take the new rate * by hours If Cells(j, 6).Value = 12 Then paycode12 = Cells(j, 12).Formula = Cells(j, 7) * Cells(j, 11) Else --~--~-~--~~~---~--~~ -- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com HELP US GROW !! We reach over 5,200 subscribers worldwide and receive many nice notes about the learning and support from the group. Our goal is to have 10,000 subscribers by the end of 2009. Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe -~--~~~~--~~--~--~---