Hello, I'd need to automate the creation of a word file from the content of excel rows, choosing a different template depending on the content of a specific cell.
I mean:
if K is 185 and D is lower than 31 (gender male) then open template 1a, populate certain fields of the template with A, B, C, H, etc..., then save to destination...
if K is 185 and D is higher than 41 (gender female) then open template 1b, populate certain fields of the template with A, B, C, H, etc..., then save to destination...
if K is 64 and D is lower than 31 (gender male) then open template 2a, populate certain fields of the template with A, B, C, H, etc..., then save to destination...
if K is 64 and D is higher than 41 (gender female) then open template 2b, populate certain fields of the template with A, B, C, H, etc..., then save to destination...
and so on for every row.
A macro would be preferred but I'm open to other solutions.
I mean:
if K is 185 and D is lower than 31 (gender male) then open template 1a, populate certain fields of the template with A, B, C, H, etc..., then save to destination...
if K is 185 and D is higher than 41 (gender female) then open template 1b, populate certain fields of the template with A, B, C, H, etc..., then save to destination...
if K is 64 and D is lower than 31 (gender male) then open template 2a, populate certain fields of the template with A, B, C, H, etc..., then save to destination...
if K is 64 and D is higher than 41 (gender female) then open template 2b, populate certain fields of the template with A, B, C, H, etc..., then save to destination...
and so on for every row.
A macro would be preferred but I'm open to other solutions.
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y |
internal identifier nr | name surname | birth date | personal identifier nr. | file nr. | city | supervisor name | date of meeting | 01/01/1900 00:00 | 19 | 185 | location of meeting | 0 | 0 | location of agreement | 01/01/1900 00:00 | P | representative name | filing date | notification date | other party representative | ||||
internal identifier nr | name surname | birth date | personal identifier nr. | file nr. | city | supervisor name | date of meeting | 01/01/1900 00:00 | 19 | 64 | location of meeting | 0 | 0 | location of agreement | 01/01/1900 00:00 | P | representative name | filing date | notification date | other party representative |
Last edited by a moderator: