Automatically send email if deadline not met

Ladislav

New Member
Joined
Feb 23, 2016
Messages
1
Hello fellows,
im facing a problem with automatically sending email to specific mail recipients.
I have a file, where i have in column "F" certain date, in column "G" is the state, if the deadline is met or not (OK/NOK). It would be easy to write a macro for this, but this is, where my problems begin:laugh:
In column "H" is one more date (date in column "F" + 9 days), in column "I" is one more state if OK/NOK, and then again in column "J" is one more date with statement in next column...
I need to send email to specific recipients (f.ex. one adress in cell "A1" + fixed list of recipients), if the deadline is not met.
For this, i need the macro to check each row in dymanic range (as the table grows each day), following this procedure:

1. if date in cell F1 < TODAY and G1 = empty or NOK, send mail (f. ex. "Dear user, your deadline was not met")
2. if date in cell F1 < TODAY but G1 = OK, go to H1 and check the same as in previous point.
3. same goes for next date in range...

On top of that, i need to make the same procedure, but reverted:

1. if date in cell F1 = 2 or less days before TODAY and G1 = empty, send mail (f. ex. "Dear user, the deadline for your project is near")
2. if date in cell F1 < TODAY and G1 = OK, go to H1 and if H1 = 2 or less days before TODAY and G1 = 0, send mail
3. again for next if date in cell H1 < TODAY and I1 = OK, check next cell in row...

It looks something like this:

[TABLE="class: grid, width: 500"]
<TBODY>[TR]
[TD]First issue[/TD]
[TD]Date 1[/TD]
[TD]State[/TD]
[TD]Date 2[/TD]
[TD]State[/TD]
[TD]Date 3[/TD]
[TD]State[/TD]
[/TR]
[TR]
[TD]11.12.2015[/TD]
[TD]12.12.2015[/TD]
[TD]OK[/TD]
[TD]21.12.2015[/TD]
[TD]NOK[/TD]
[TD]1.5.2016[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5.1.2016[/TD]
[TD]6.1.2016[/TD]
[TD]OK[/TD]
[TD]15.1.2016[/TD]
[TD]OK[/TD]
[TD]22.2.2016[/TD]
[TD]NOK[/TD]
[/TR]
[TR]
[TD]13.1.2016[/TD]
[TD]14.1.2016[/TD]
[TD]OK[/TD]
[TD]23.1.2016[/TD]
[TD]OK[/TD]
[TD]1.6.2016[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]18.1.2016[/TD]
[TD]19.1.2016[/TD]
[TD]OK[/TD]
[TD]28.1.2016[/TD]
[TD]NOK[/TD]
[TD]1.4.2016[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]22.2.2016[/TD]
[TD]23.2.2016[/TD]
[TD][/TD]
[TD]3.3.2016[/TD]
[TD][/TD]
[TD]7.5.2016[/TD]
[TD][/TD]
[/TR]
</TBODY>[/TABLE]


As the excell file will run nonstop, i need to do it all automaticaly if conditions are met.
Im stuck on this for several days and im beginning slowly to lose my mind:eeek:
Pleas, could anybody help with this?
Thank you very much
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,223,228
Messages
6,170,874
Members
452,363
Latest member
merico17

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