macro to that checks if a cell changes than waits half a second before checking again.

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
3,194
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi Everyone,

I have a macro that send me an email about sales.


sheet"Data1" Cell H2 should be "0" (Zero) however when something goes wrong it changes so goes higher 1,2,3,4,50 etc.

I have a macro called "Emery" the is set to email me and works great I need this macro to "Call Emery" when the value in cell H2 changes to more than 0,

however there are two other criteria, first lest say Cell H2 changes to 1, I want the macro to be triggered but wait half a second and check if H2 is still greater than zero (it can change up to 2 or any number) but if its droped back down to zero do nothing, if its still greater than zero, then "Call Emery".
now the next bit,

I now want this macro to do nothing for 5 minutes, so if the value changes again I don't keep getting emails, once five minues is over then if H2 is still greater then 0 call Emery again if not just wait for the next time it changes.

So effectively i'll only get an email max every 5 minutes and only when value is greater than zero.

I hope that was clear to follow, please help if you can.
Tony
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Hi Everyone,
Any ideas on this I'm going around in curcles trying to do it?

Thanks

Tony
 
Upvote 0

Forum statistics

Threads
1,214,877
Messages
6,122,051
Members
449,064
Latest member
scottdog129

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top