VBA-select cells meeting specific criteria & email

N3rdgrl

New Member
Joined
Aug 22, 2010
Messages
1
Hello! Any help with this is appreciated including but not limited to actual code. I'm trying to help someone streamline a process but this is a little above my skill level.

Here is what I want to accomplish:
After pasting data from a .txt file into column A on worksheet "Data"

send an email to district managers containing only the data from column A in worksheet Data that are for location codes in their region. I need the data in the body of the message not as an attachment.

Possibly important factors:
There are currently 224 locations divided into 6 regions
The location code (a 5 digit #) will be buried in the line pasted in column A (meaning not always the first or last thing on the line)
Row counts will change
Some data will not be sent (I can have the user delete what doesn't need to be emailed but if there's a way to code it why not!)
If there is nothing to report no email should be sent


Again, thank you for any advice! Rest assured that I will not claim credit for your work! Anytime I have borrowed code I note where it came from in a comment so if you'd like me to note something other than your MrExcel.com user name please let me know!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,148,160
Messages
5,745,121
Members
423,926
Latest member
Komaua Ubaroro

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
Top