1. In your worksheet module add the following procedure

'if there is change in the Column-H mailPrice module will be called.
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim r As Range
    Set r = Intersect(Target, Range("H3:H80"))
    If r Is Nothing Then Exit Sub
    If r.Rows.Count > 0 Then mailPrice
End Sub

2. Add following module: This module will send the mail, if the mail
software is open and appropriately set.
Sub mailPrice()
'
    Dim actPrice As Double
    Dim mktPrice(1) As Double
    Dim splitVal
    splitVal = Split(Range("G3"), "-")
    mktPrice(0) = splitVal(0)
    mktPrice(1) = splitVal(1)
    actPrice = Range("H3")
    If actPrice > mktPrice(0) And actPrice < mktPrice(1) Then
        Dim msg As String
        msg = Range("A3")
        ActiveWorkbook.SendMail Recipients:="[EMAIL PROTECTED]", Subject:=msg
    End If

End Sub

The above module is for third row only. You can extend it for all the rows
using loop.

Akhilesh Kumar Karna


On Tue, Dec 9, 2008 at 3:07 PM, Shreyas. Shringarpure <
[EMAIL PROTECTED]> wrote:

>  Following is an excel sheet which contains data abt shares I want to
> follow.
>
> I want to get an email to my id once the actual market price reaches a
> value in the range of Expected mkt price. Is this possible?
>
>
>
> Thanks & Regards,
>
>  | Shreyas Shringarpure | Team Lead (BA)– DTM | Target Corporation India |
> +91 98458 72335 | +91 80 4164 7204 |  [EMAIL PROTECTED] |
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
Visit the blog to download Excel tutorials at 
http://www.excel-macros.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/excel-macros?hl=en

Visit & Join Our Orkut Community at 
http://www.orkut.com/Community.aspx?cmm=22913620

Visit the blog to download Excel tutorials at 
http://www.excel-macros.blogspot.com

To Learn VBA Macros Please visit http://www.vbamacros.blogspot.com

To see the Daily Excel Tips, Go to:
http://exceldailytip.blogspot.com
-~----------~----~----~----~------~----~------~--~---

Reply via email to