Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.setup
|
|||
|
|||
email with condition
HI All,
I am working on a worksheet which has a range N11: N33 and has a Numeric Value, I want to send a email directly from EXCEL if any cell in this range gets the value 2. If there is more than 1 cell which has value more than 2, two different mail should go with a Text body, I am writing a code: Private Sub Worksheet_Change(ByVal Target As Range) Dim rng As Range If Target.Cells.Count 1 Then Exit Sub On Error GoTo EndMacro If Not Target.HasFormula Then Set rng = Target.Dependents If Not Intersect(Range("N11"), rng) Is Nothing Then If Range("N11").Value 2 Then Mail_with_Outlook2 '(Macro to send email) ElseIf Range("N12").Value 2 Then Mail_with_Outlook1 ' (Macro to send email2) ....... ....... If I use ElseIf, other condition do not get validated if the first condition is fulfilled any suggestions?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
***** PLEASE HELP **** Send an email from Excel to outlook with an automatic macro | Excel Discussion (Misc queries) | |||
Email from excel.. please help?? | Excel Discussion (Misc queries) | |||
sending email from excel not working | Excel Discussion (Misc queries) | |||
Move a Column of 500 Email Addresses into BCC Field of an Email | Excel Worksheet Functions | |||
body of email disappears when I send an email from Excel | Excel Discussion (Misc queries) |