View Single Post
 
Old 04-20-2018, 12:26 PM
etcib etcib is offline Windows 7 64bit Office 2007
Novice
 
Join Date: Apr 2018
Posts: 2
etcib is on a distinguished road
Default VBA Code to automatically complete mail-merge document for upto 200 recipients

Hi All,

Not sure this is even possible but I've got so far in a project as a novice I'm now wanting to push the boundaries that little bit more!

The scenario: I have 200 rows of data - one row for each person; I have upto 200 column headers (in the first row), with an individual's data in the columns if relevant (if not relevant, the column for that row is set to blank) - the cells are filled in based on that individual's results and not all columns are always used. The columns are based on what a person can/cannot do and have one of three titles (one for each skill, 'Well#', 'OK#'' or 'Bad#') - it is this information I want to put into a single table for the individual (where# is a number between 1 and 54 for the possibility of 54 skills requiring analysis)

I could manually create a mail-merge document using word/publisher that pulls in the things the person can do ('Well#'), the things they can start but not finish ('OK#') and the things they cannot do ('Bad#') - essentially putting all the well comments in one column of a feedback table, OK comments in the middle column and Bad in the end column...however, whilst I am capable of creating the mail-merge document manually, I am mindful that not everyone will be able to who might wish to use it.

Is there any chance VBA (button) can be created/manipulated to automatically produce the tables (one for each row).

The data table is on a sheet called 'Breakdown' and has columns surname, forename, Well 1, well 2,...well 54 (for the things they do well) OK1, OK 2,...,OK54 (for the OK skills) and Bad 1, Bad 2, ..., Bad 54 (for the the things they don't do well on - Well 1 relates to the same skill as OK1 and Bad 1 so only one of these will ever be filled in for each row.

The required table has three columns - one for the comments in the Well section, one for the OK section and one for the Bad section.

I'm a novice with VBA, but I've picked, plucked and manipulated basic code well enough to give something 'more exciting' a go.

I hope the scenario makes sense!

Thanks for any help!
Reply With Quote