Cell Change Alerts

The situation:

I have a table of a number of live share price links that are automatically being updated in real time within Excel.

The goal:

To receive an email each time the share price of a particular stock moves up or down by an increment of 1%.

The progress:

I have created a macro that can produce the email, using a number of concatenations to provide me with the desired text.

The difficulties:

I have been unable to find a way of working out how to automate the macro if a cell reference moves by increments of 1%. Now I have thought that if something goes from 0.99% to 1.01% and back to 0.98% then I only want one email on the initial occurance, and then the base to move to 1 rather than 0, and to readjust the parameters for the email to either 0% or 2% being reached. It's just finding a way to link all of this together. I'm slowly trying to get there but I have no experience in VBA and it's normally just the record button that is used if i ever do write a macro. A message box idea nearly worked, highlight the cell was above the threshold, and then i could manually run a macro, but that all went over my head eventually as i'm sure there must be a way to automate this. Opening the file first thing on a new day also needs to avoid sending emails everywhere when it is up and running because all the share price changes will revert to 0% in the mornings and thus it will all fly out with emails everywhere because of the changes.

Hmmmm, please help me, I'm drowning in a world of something I don't really understand, and the issue is starting to affect my life - I was thinking about a solution in the pub the other day and that sort of behaviour can not continue!!



Answer this question

Cell Change Alerts

  • Lee Walters

    When I was younger, so much younger than today, I never needed anybody's Excel help in any way But now these days are gone, I'm not so VB assured, Now I find I've lost my mind and opened up the doors. Help me if you can, my macro's down And I do appreciate you reading this far Help me get my worksheet off the ground, Won't you PLEASE PLEASE HELP ME! This is what I'm using so far - I just need to automate this macro when a cell goes above a 1% margin either way, and at further 1% margins once the first is reached. Sub PUZZLE() Dim theApp, theNameSpace, theMailItem, myAttachment, MessageBody, subject Set theApp = CreateObject("Outlook.Application") Set theNameSpace = theApp.GetNameSpace("MAPI") Set theMailItem = theApp.CreateItem(0) theMailItem.Display Set myAttachment = theMailItem.attachments MessageBody = Sheets("SCKDRM").Range("AG3").Value & Sheets("SCKDRM").Range("AH3").Value & Sheets("SCKDRM").Range("AI3").Value subject = "TEST - SUBJECT ENTER HERE - " & Now() theMailItem.Recipients.Add ("email 1 email 2 email 3") theMailItem.subject = subject theMailItem.Body = MessageBody theMailItem.Send theNameSpace.Logoff Range("A1").Select End Sub A reply just to say that this can't be done would be great - at the moment I'm just frustrated that I'm not sure if it can be done or not! Many thanks, Ross
  • Cell Change Alerts