Forum Discussion
Is there a function in Excel that works like a Mail Merge in Word?
donnabrownmilvetsnc to add to the answers you've already gotten, if you not only want to put data from Sheet A into adjacent or neighboring cells in Sheet B, but also to merge multiple cells from A into one cell in B, then you need to use the CONCAT function. And if some of the data are numeric cells it still is possible but that would add another layer.
So if you can upload sample files to illustrate more fully the challenge you're facing, you'd get more detailed & specific answers. To your broad question "Is it possible?" Yes.
- donnabrownmilvetsncNov 26, 2019Copper Contributor
mathetes I added a sample of the info I'm working with.
- mathetesNov 26, 2019Silver Contributor
I've created an example (slightly modifying your sheet) to show one solution. This doesn't do that request that you have one new tab for each possible combination; frankly, I don't agree that you need that.
Instead what I've done is add one column for an Employee ID #, and then used that as the basis for looking up (VLOOKUP) the data elements and putting them into the form. For the life of me, though, I don't understand why all the merged cells on that particular sheet, why the underlying cells are small squares. That's utterly unnecessary (unless there's something I don't get). I left it because it doesn't interfere with showing you how to retrieve the data.
Anyway, where the "merge" was needed was in concatenating the first name, MI, and last name...you'll see I did that by using the "&" symbol between lookups and spaces. That's the easiest way to do that particular merge.
Here's the formula: =VLOOKUP(I10,EE_DB,2,0)&" "&VLOOKUP(I10,EE_DB,3,0)&" "&VLOOKUP(I10,EE_DB,4,0)
Then the formula for all the other cells is a simpler single VLOOKUP, such as =VLOOKUP(I10,EE_DB,5,0) to get the Division/Section data element.
It's entirely possible that you could use your "Beacon ID" as the basis for the lookup (in which case, move it to the first column), so long as that's a unique ID for each person.
And you'll see I created a field where you enter the employee ID on that output page...you can just cycle through those (writing a macro if desired, for a long list of ee's), if you are envisioning doing this as a batch job. Doing it individually, or just for a few at a time, just enter the ID and print the sheet resulting.
I left the balance blank for you to create the VLOOKUP formulas yourself, to get familiar with that very useful function.
- donnabrownmilvetsncNov 26, 2019Copper Contributor
Thank you very much for your help mathetes!
This sheet is a travel reimbursement form, containing about 300 rows of additional data that I deleted in order to send you a copy of the few cells I was mostly concerned with; that is why there are 37 columns all bunched together. The reason I would ideally like new tabs created is because the rest of the sheet will contain unique information that would only pertain to each individual row of data.
I am just trying to figure out an easier way to be able to complete these travel reimbursements for 80+ employees that all attend the same conference. The alternative is hand-keying (or cutting/pasting) the data from the database report into the individual sheets.
Thanks again for your help! I will play around with the vlookup formula.
Donna