Automatic Extract Distribution VBA

accountant124

New Member
Joined
Sep 26, 2019
Messages
4
Maybe a bit of a long shot but I thought I'd give it a go anyway!

I have a set of data, from which there are a number of (formula driven) extracts in other sheets within the same workbook. I'm looking for a macro which will go down the contacts list, see which extracts each contact needs and send the relevant one to them in a separate email with an attachment.

A couple of issues:
1) The extract will need to be hard coded/valued before it is saved/sent.
2) The extracts/attachments which are sent need to be saved in an archive folder location.

I've attached a set of data which replicates the data I have.

Thanks in advance for your help!!
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Just realised I can't attach data sets...

The first sheet has the base data in Col B to F.
The second sheet is called 'Finance Extract' and links cells in Col B:F with direct cell links (='Base List'!B3).
The third sheet is called 'CONTACTS' and in Col A has the name of the extract required (Finance Extract) and in Col B is the email address of the recipient.

As mentioned above, when it is exported and saved, the formulas in the extract (Finance Extract) need to be broken.

Hopefully that helps.
 
Upvote 0
I have various doubts:
- The data to be sent are those of the "Finance Extract" sheet, but which part or what data?
- Email is outlook?
- What is the file going to be called?
- If several files are going to be generated for each email, how will each file be called?
- Where to get the email address?
- Subjet?
- Body?

You could upload a copy of your file to a free site such www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here. If the workbook contains confidential information, you could replace it with generic data.
 
Upvote 0
Perfect, thanks! Here you go.....

https://www.dropbox.com/s/k1cuwqd4vmzcx68/Product List.xlsm?dl=0

In answer to your questions:

- All of the data in the extract needs to be sent.
- Yes, I need to send in outlook as an Excel attachment.
- The file can just be called 'Extract *Date*'
- It will be one file per email.
- The email address is in Col. B of the CONTACTS sheet
- Subject should be 'New Product List'
- Body can be generic 'Hi, please see attached.'
 
Upvote 0
I did not understand your file. In the "CONTACTS" sheet there is only one record, then only one email and one file will be created.
I also don't understand why the "Finance Extract" sheet has the same information as the "Base List" sheet.
You could explain more in depth what you need. Maybe you need to send a file with more data and explain what you need inside the file.
 
Upvote 0
I did not understand your file. In the "CONTACTS" sheet there is only one record, then only one email and one file will be created.
I also don't understand why the "Finance Extract" sheet has the same information as the "Base List" sheet.
You could explain more in depth what you need. Maybe you need to send a file with more data and explain what you need inside the file.


Sorry for the confusion - hopefully the updated file here makes more sense.... https://www.dropbox.com/s/62qhiunydu7ex2b/Product List.xlsm?dl=0
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,693
Members
448,979
Latest member
DET4492

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