+ Reply to Thread
Results 1 to 19 of 19

How I wish Excel had Mail Merge

  1. #1
    Registered User
    Join Date
    06-19-2015
    Location
    UK
    MS-Off Ver
    MS Office 2007
    Posts
    10

    How I wish Excel had Mail Merge

    Hi All, New to the forum so excuse any mistakes please

    I have a little problem that would be easy to solve IF Excel had mail merge but as it doesn't I'm wondering if there is a Macro solution.

    I need to create about 130 almost identical workbooks. Each one has about 10 cells that make it different from the rest, (name, etc) I have all these in a workbook one per row and a nice template to work with but I'm wondering if there is a method of automating the insertion of this information into the template and saving it as with the name as a file name? I could cut/paste each one but thats a long slow process and feel in my gut there must be a way to automate this.

    Thanks in advance,
    Chris

  2. #2
    Registered User
    Join Date
    03-08-2011
    Location
    Minneapolis, Minnesota, USA
    MS-Off Ver
    Excel 2013
    Posts
    18

    Re: How I wish Excel had Mail Merge

    Where is the information that you're updating it with coming from?

  3. #3
    Registered User
    Join Date
    03-08-2011
    Location
    Minneapolis, Minnesota, USA
    MS-Off Ver
    Excel 2013
    Posts
    18

    Re: How I wish Excel had Mail Merge

    Nevermind, just re-read your post, you have them in a separate worksheet, one per row...

    Can you post example workbooks?

  4. #4
    Registered User
    Join Date
    06-19-2015
    Location
    UK
    MS-Off Ver
    MS Office 2007
    Posts
    10

    Re: How I wish Excel had Mail Merge

    Wow that's a quick response! Not at the moment I cant because They are on my work PC and its officially the weekend now YAY! lol but basically there is a table set up in the template with cells for name, form group, and some grades. (these cells are not all sequential which probably doesn't help I know)
    Then in the source sheet there is one row per student, (name,form,grade,grade.....etc) then next row the next student. Basically I need a copy of the template per student, saved under their name would be best.
    I know I could enter the data manually and save then enter next one but such a repetitive job seems just made for a mail merge if only Excel had one
    In case its not obvious I work in a school.
    If it helps I know minimal Visual basic, enough that if I had a macro that did the insert name at a1, insert form group at b1 save template as name in a1 then onto the next source line until it ran out of source lines. I could adjust the macro to insert into the correct cells and copy/paste the insert code to insert the other bits. (Probably, Maybe. lol)

  5. #5
    Registered User
    Join Date
    03-08-2011
    Location
    Minneapolis, Minnesota, USA
    MS-Off Ver
    Excel 2013
    Posts
    18

    Re: How I wish Excel had Mail Merge

    Basically we would take your list, create variables for Name, Group, etc. Then loop through each line, opening the template, updating the fields, then saving the template as a new file based on the data, rinse-repeat.

    Can't give exact code without examples though...

  6. #6
    Registered User
    Join Date
    06-19-2015
    Location
    UK
    MS-Off Ver
    MS Office 2007
    Posts
    10

    Re: How I wish Excel had Mail Merge

    I'll see what I can dig out monday thanks for the help

  7. #7
    Registered User
    Join Date
    06-19-2015
    Location
    UK
    MS-Off Ver
    MS Office 2007
    Posts
    10

    Re: How I wish Excel had Mail Merge

    Here are the template and data files samples... Hope they help
    Oh and these are Office 2010 files I just realized I use 2010 at work but put 2007 in info because that's what I use at home.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    06-19-2015
    Location
    UK
    MS-Off Ver
    MS Office 2007
    Posts
    10

    Re: How I wish Excel had Mail Merge

    Hi all,
    Just peeping in see if anyone has any ideas

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How I wish Excel had Mail Merge

    Hi Chris

    Welcome to the Forum!!!

    Can(will) the Cell references in Row 2 of Data File remain in your actual Data File?
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  10. #10
    Registered User
    Join Date
    06-19-2015
    Location
    UK
    MS-Off Ver
    MS Office 2007
    Posts
    10

    Re: How I wish Excel had Mail Merge

    Hi John,
    To be honest I put them in to aid in clarity for anyone in the forum looking at the sample files....
    The cell references can stay or go either is just as easy for me. In fact the headers can probably go too and just have the raw student data in them.
    Obviously the data is sample data because I cannot publish actual student data I will be pulling the real data from a database that will export to an excel spreadsheet which I will then use as the data source but I can adjust that data file however works best.
    Its one of those situations I instinctively felt would be ideal to automate otherwise I have about 130 sheets to copy manually and then copy/paste in the data which should be a breeze for a pc lol
    It feels like it should be as easy as a mail merge which I've used often to produce final reports but alas Excel doesn't do mail merge lol
    Thanks in advance

    Chris

  11. #11
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How I wish Excel had Mail Merge

    Hi Chris

    Quite honestly it can be done either way, with or without the Cell references. The mental gymnastics are greatly reduced if the Cell references are in the Data Sheet.

    Question is...how do you wish it? You tell me...

  12. #12
    Registered User
    Join Date
    06-19-2015
    Location
    UK
    MS-Off Ver
    MS Office 2007
    Posts
    10

    Re: How I wish Excel had Mail Merge

    Whichever is easiest I'm happy with. My main goal is to have something usable. If I can actually understand how its working then that is a Bonus. I have basic VB understanding and have managed to modify some simple macros that almost did jobs I needed when I found them, For example, I found a script that took data from multiple workbooks and made a data sheet (kind of the opposite of what I need now) and understood it enough to modify it to collect data from more cell references than the original. But that's about the limit of my knowledge. I'm of an age where when we where growing up thats how you learned to program, take something that did a job and work out how it did it and modify it as you went along lol.
    Thanks for all your support

  13. #13
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How I wish Excel had Mail Merge

    Hi Chris

    It's about 10:30PM here and I'm about to retire for the night. This is fairly straightforward.

    It's supposed to rain most of tonight and tomorrow so no outside work.

    I MAY have a bit of Grandson duty in the AM. If another does not resolve your issue before I'll get back to you tomorrow with a solution that works on your Sample Data.

  14. #14
    Registered User
    Join Date
    06-19-2015
    Location
    UK
    MS-Off Ver
    MS Office 2007
    Posts
    10
    Lol that would be awesome. As its about 4am here I should probably head off for some sleep myself.

  15. #15
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How I wish Excel had Mail Merge

    Get back to you tomorrow Chris...

  16. #16
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How I wish Excel had Mail Merge

    Hi Chris

    This Code is in the attached Template Workbook and appears to do as you require.

    Place both Workbooks in the SAME Folder, matters not where. Open the Template Workbook. CTRL + x will fire the Code.

    The Code will ask you to select a Data File; select it.

    The Code will then create a Sub Folder "Student Files" and create and populate each Student File with it's respective Data and save and close it to this Sub Folder.

    You'll notice I kept this
    Can(will) the Cell references in Row 2 of Data File remain in your actual Data File?
    This can be done with an array if need be. Let me know of issues.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    06-19-2015
    Location
    UK
    MS-Off Ver
    MS Office 2007
    Posts
    10

    Re: How I wish Excel had Mail Merge

    Peeps in to see if jaslake or eg0e or anyone else for that matter has had any success
    ....
    Wow that was odd.... Jaslake's response didnt show and I in fact had no notification he had even replied until I posted then suddenly there it was :D

    Will give it a try at work on Monday but thanks in advance Jaslake

  18. #18
    Registered User
    Join Date
    06-19-2015
    Location
    UK
    MS-Off Ver
    MS Office 2007
    Posts
    10

    Re: How I wish Excel had Mail Merge

    Hi John,
    You are a star!
    This macro works just as I needed.
    Thank you so much.
    Cheers,
    Chris

  19. #19
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How I wish Excel had Mail Merge

    You're welcome...glad I could help. Thanks for the Rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 01-05-2015, 07:35 AM
  2. Replies: 2
    Last Post: 01-22-2013, 11:37 AM
  3. Replies: 2
    Last Post: 07-12-2012, 08:11 PM
  4. Can I merge an excel list to an excel sheet like mail merge in wor
    By chcoach in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2006, 03:15 PM
  5. [SOLVED] merge with Word How can I get excel to mail merge zip codes plus 4 correctly?
    By Kathy at Sauder Feeds in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-30-2005, 07:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1