Hi Everyone,
I need a little assistance with the VBA code for sending emails from Excel via outlook.
I am still learning VBA coding and I would like to filter or sort values before sending out the automated email without duplicating the values.
For example:-
The email should go out when value in the Cell in the Due days column reaches 3 - In this Example, tom has 3 days due to submit his report on 4 instances in the table. So instead of TOM getting 4 different or separate emails, I want tom to get only One email with all 4 line items.
So the email that tom would get would look something like this -
[TABLE="class: cms_table, width: 463"]
<tbody>[TR]
[TD]Sales Person[/TD]
[TD]Mail Send Yes or No[/TD]
[TD]Due days[/TD]
[TD]Mail address[/TD]
[/TR]
[TR]
[TD]Tom[/TD]
[TD]Not Sent[/TD]
[TD]3[/TD]
[TD]tom@something.abc[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: cms_table, width: 463"]
<tbody>[TR]
[TD]Tom[/TD]
[TD]Not Sent[/TD]
[TD]3[/TD]
[TD]tom@something.abc[/TD]
[/TR]
[TR]
[TD]Tom[/TD]
[TD]Not Sent[/TD]
[TD]3[/TD]
[TD]tom@something.abc[/TD]
[/TR]
</tbody>[/TABLE]
The same would apply for Ron and Debra . Is this possible in VBA ?
I would appreciate any kind of help for this issue.
Thank you.
Sample table.
[TABLE="class: cms_table, width: 463"]
<tbody>[TR]
[TD]Sales Person[/TD]
[TD]Mail Send Yes or No[/TD]
[TD]Due days[/TD]
[TD]Mail address[/TD]
[/TR]
[TR]
[TD]Tom[/TD]
[TD]Not Sent[/TD]
[TD]3[/TD]
[TD]tom@something.abc[/TD]
[/TR]
[TR]
[TD]Dave[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]dave@something.abc[/TD]
[/TR]
[TR]
[TD]Ron[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]ron@something.abc[/TD]
[/TR]
[TR]
[TD]Debra[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]debra@something.abc[/TD]
[/TR]
[TR]
[TD]Gord[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]gord@something.abc[/TD]
[/TR]
[TR]
[TD]Tom[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]tom@something.abc[/TD]
[/TR]
[TR]
[TD]Tom[/TD]
[TD]Not Sent[/TD]
[TD]3[/TD]
[TD]tom@something.abc[/TD]
[/TR]
[TR]
[TD]Tom[/TD]
[TD]Not Sent[/TD]
[TD]3[/TD]
[TD]tom@something.abc[/TD]
[/TR]
[TR]
[TD]Debra[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]debra@something.abc[/TD]
[/TR]
[TR]
[TD]Debra[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]debra@something.abc[/TD]
[/TR]
[TR]
[TD]Ron[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]ron@something.abc[/TD]
[/TR]
[TR]
[TD]Ron[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]ron@something.abc[/TD]
[/TR]
[TR]
[TD]Ron[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]ron@something.abc[/TD]
[/TR]
[TR]
[TD]Ron[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]ron@something.abc[/TD]
[/TR]
[TR]
[TD]Ron[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]ron@something.abc[/TD]
[/TR]
[TR]
[TD]Ron[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]ron@something.abc[/TD]
[/TR]
[TR]
[TD]Ron[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]ron@something.abc[/TD]
[/TR]
[TR]
[TD]tom[/TD]
[TD]Not Sent[/TD]
[TD]3[/TD]
[TD]tom@something.abc[/TD]
[/TR]
</tbody>[/TABLE]
I need a little assistance with the VBA code for sending emails from Excel via outlook.
I am still learning VBA coding and I would like to filter or sort values before sending out the automated email without duplicating the values.
For example:-
The email should go out when value in the Cell in the Due days column reaches 3 - In this Example, tom has 3 days due to submit his report on 4 instances in the table. So instead of TOM getting 4 different or separate emails, I want tom to get only One email with all 4 line items.
So the email that tom would get would look something like this -
[TABLE="class: cms_table, width: 463"]
<tbody>[TR]
[TD]Sales Person[/TD]
[TD]Mail Send Yes or No[/TD]
[TD]Due days[/TD]
[TD]Mail address[/TD]
[/TR]
[TR]
[TD]Tom[/TD]
[TD]Not Sent[/TD]
[TD]3[/TD]
[TD]tom@something.abc[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: cms_table, width: 463"]
<tbody>[TR]
[TD]Tom[/TD]
[TD]Not Sent[/TD]
[TD]3[/TD]
[TD]tom@something.abc[/TD]
[/TR]
[TR]
[TD]Tom[/TD]
[TD]Not Sent[/TD]
[TD]3[/TD]
[TD]tom@something.abc[/TD]
[/TR]
</tbody>[/TABLE]
The same would apply for Ron and Debra . Is this possible in VBA ?
I would appreciate any kind of help for this issue.
Thank you.
Sample table.
[TABLE="class: cms_table, width: 463"]
<tbody>[TR]
[TD]Sales Person[/TD]
[TD]Mail Send Yes or No[/TD]
[TD]Due days[/TD]
[TD]Mail address[/TD]
[/TR]
[TR]
[TD]Tom[/TD]
[TD]Not Sent[/TD]
[TD]3[/TD]
[TD]tom@something.abc[/TD]
[/TR]
[TR]
[TD]Dave[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]dave@something.abc[/TD]
[/TR]
[TR]
[TD]Ron[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]ron@something.abc[/TD]
[/TR]
[TR]
[TD]Debra[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]debra@something.abc[/TD]
[/TR]
[TR]
[TD]Gord[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]gord@something.abc[/TD]
[/TR]
[TR]
[TD]Tom[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]tom@something.abc[/TD]
[/TR]
[TR]
[TD]Tom[/TD]
[TD]Not Sent[/TD]
[TD]3[/TD]
[TD]tom@something.abc[/TD]
[/TR]
[TR]
[TD]Tom[/TD]
[TD]Not Sent[/TD]
[TD]3[/TD]
[TD]tom@something.abc[/TD]
[/TR]
[TR]
[TD]Debra[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]debra@something.abc[/TD]
[/TR]
[TR]
[TD]Debra[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]debra@something.abc[/TD]
[/TR]
[TR]
[TD]Ron[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]ron@something.abc[/TD]
[/TR]
[TR]
[TD]Ron[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]ron@something.abc[/TD]
[/TR]
[TR]
[TD]Ron[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]ron@something.abc[/TD]
[/TR]
[TR]
[TD]Ron[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]ron@something.abc[/TD]
[/TR]
[TR]
[TD]Ron[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]ron@something.abc[/TD]
[/TR]
[TR]
[TD]Ron[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]ron@something.abc[/TD]
[/TR]
[TR]
[TD]Ron[/TD]
[TD]Not Sent[/TD]
[TD]5[/TD]
[TD]ron@something.abc[/TD]
[/TR]
[TR]
[TD]tom[/TD]
[TD]Not Sent[/TD]
[TD]3[/TD]
[TD]tom@something.abc[/TD]
[/TR]
</tbody>[/TABLE]