Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

using code split information

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Using code to split information in excel tabs into body of emai

Using code to split information in excel tabs into body of emai

ResolvedVersion 2010

Michael has attended:
Excel Intermediate course

Using code to split information in excel tabs into body of emai

Hello,

As my title suggests, I am looking to use information, I have split up into excel tabs, to go into the body of separate emails in outlook.

So what I have done so far is use a VBA code to split the data that I received into separate tabs.

Now i am looking to make a VBA code to make each tab go in the body of its own email (in outlook) and also to be emailed to the specific person in the relevant tab.


for example:

name Department bonus Manager email
Phil IT 100 JD Henderson jd@email.com

If this was an example of one tabs information. I would like to get the information into something like this:

to: jd@email.com

Dear JD Henderson,

Your employee Phil from IT is entitled to a bonus of 100 this year

regards

Barry Manilow



I hope this clarifies what I am looking for. So far I have only managed to make the code send it as an attachment.

kind regards

Michael

RE: Using code to split information in excel tabs into body of

Hi Michael,

Thank you for the forum question.

What you want can easily be done in MS Word.

Under mail merge you can create emails where you can use the data in Excel.

It can also be done in VBA. You will need to store the data in variables and loop through the records and worksheets.

I do not know how much knowledge you have about VBA, but you can find some good examples sending emails from Excel VBA on the website:

www.rondebruin.nl



Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
Best STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

Tue 7 Jul 2015: Automatically marked as resolved.

Excel tip:

Quickly copy a formula across sheets

Suppose you have a formula in cell Sheet1!B2, say =A1*5%, that you wish to copy to cell B2 on Sheet2, Sheet3 and Sheet4. Instead of using copy and paste, try this: (1) Select Sheet1!B2. (2) Group Sheet1 with the worksheets Sheet2, Sheet3 and Sheet4 by holding down Ctrl and clicking on the tabs of the sheets to group them. (3) Press the F2 key, then immediately press Enter to copy the formula in Sheet1!B2 across the grouped sheets.

Remember to ungroup the sheets afterwards! Right-click on any tab and choose Ungroup Sheets to do that.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.12 secs.