Emailing reports based on multiple drop down box conditions

soconfused365

New Member
Joined
May 16, 2022
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I am incredibly confused here!

I have a workbook with a sheet for each month of the year Jan,Feb,Mar etc and in each one is multiple names in column A over and over (lots of other info in the other columns but its all related to the column A name). I have a reporting tab and from that I need to have 2 buttons - one send to all and 1 send to specific

Specific - I need to unprotect the sheet for the month that is selected in the drop down box, filter it to the persons name in the 2nd drop down box, copy that filtered worksheet to another workbook on its own, lock it again so they cant see the other information in there and then email it to them

Send to all - Same as above but it does 1 after the other of all the names within the list

I have a lookups sheet with each of their names next to their email address. I do not need to save the resulting sheets. All sheets have the same password to unprotect. All possible names are within the list and there is no variance on them. Same with the months drop down - they are exactly the same as the tabs.

Message within the email body also needs to refer to the month drop down eg Hi *NAME* Please see attached *Jan*

I have found lots of little bits that can do 1 of these jobs but then when I try and put them all together it goes all higgledy-piggledy so any help would be greatly appreciated! On the latest updating 365 version and if you need to know anything else just ask!
 
The single is working perfectly now thank you!

With the multiple I am getting a run time error
Outlook does not recognise 1 or more of the names. This is fed from the same list as the single ones. When I click on debug it takes me to

.Send

Right at the end under the email the individual report section

Any ideas?
That is strange. Do you know which particular names/email addresses it's having trouble with, and have you tried emailing just those names (with the first code) to make sure they are valid?
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
I got it working it just needed a bit of a nudge from where I copy and pasted it! You are absolutely magnificent thank you so so much!
 
Upvote 0
I got it working it just needed a bit of a nudge from where I copy and pasted it! You are absolutely magnificent thank you so so much!
Glad I could help, and thanks for the feedback. Mark as solution if it gives you all you want ;)
 
Upvote 0
Solution

Forum statistics

Threads
1,224,825
Messages
6,181,191
Members
453,021
Latest member
pingpong7117

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