jeffcoleky
Active Member
- Joined
- May 24, 2011
- Messages
- 274
I have created a macro that works, but it only works with my specific example data. If there are more or less rows, or different data in the cells, it will not work because it is not written dynamically. I lack the skillset to make it dynamic also
Link Example data containing Macro: https://1drv.ms/x/s!AmDnPhDNb87xmgbVlpKgTJU58I6y (shared via OneDrive)
Objective: Modify Data so that I can easily use mail-merge to Mail a letter individually two both people in each row at both addresses (if two different addresses exist different)
Here are the steps the macro takes:
<tbody> </tbody>
Example RAW data (Before macro):
<tbody>
</tbody>
Example of what data should look like AFTER macro:
<tbody>
</tbody>
(Note that a link to a file with all the example data can be found above)
Link Example data containing Macro: https://1drv.ms/x/s!AmDnPhDNb87xmgbVlpKgTJU58I6y (shared via OneDrive)
Objective: Modify Data so that I can easily use mail-merge to Mail a letter individually two both people in each row at both addresses (if two different addresses exist different)
Here are the steps the macro takes:
| ||
| ||
| ||
| ||
| ||
| ||
| ||
Here is the current macro:
Code:
|
<tbody> </tbody>
Example RAW data (Before macro):
ID# | BOTH-Names | First | Last | First2 | Last2 | Street | City | State | Zip | StreetB | CityB | StateB | ZipB |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ABC123 | Thomas Joneses | Thomas | Joneses | 1151 Glenhurst Ave | Shepherds | NC | 50916 | 8189 CHRISTIAN CT APT 893 | Shepherds | NC | 50922 | ||
ABC124 | Fidel & Maria Smartie | Fidel | Smartie | Maria | Smartie | 5991 Braidwood Dr | Shepherds | NC | 50919 | 5991 BRAIDWOOD DR | Shepherds | NC | 50919 |
ABC125 | Jackie & Christina Spitter | Jackie | Spitter | Christina | Spitter | 5718 Midnight Ln | Shepherds | NC | 50929 | 5718 MIDNIGHT LN | Shepherds | NC | 50929 |
ABC126 | Donald Lulu | Donald | Lulu | 9118 Galene Dr | Shepherds | NC | 50999 | 9118 GALENE DR | Shepherds | NC | 50999 | ||
ABC127 | George & Dorothy Hard | George | Hard | Dorothy | Hard | 1811 Libby Ln | Shepherds | NC | 50972 | 7816 RUTLEDGE RD | Shepherds | NC | 50958 |
ABC128 | Samantha Davenport | Samantha | Davenport | 7919 Black Walnut Cir | Shepherds | NC | 50929 | 7919 BLACK WALNUT CIR | Shepherds | NC | 50929 | ||
ABC129 | Jackie Katnip | Jackie | Katnip | 3399 Ethelwood Dr | Shepherds | NC | 50999 | 3399 ETHELWOOD DR | Shepherds | NC | 50999 | ||
ABC130 | Mary Smithie | Mary | Smithie | 8985 Dogoon Dr | Shepherds | NC | 50923 | 8985 DOGOON DR | Shepherds | NC | 50923 | ||
ABC131 | Wanda Chef | Wanda | Chef | 6817 Carolina Ave | Shepherds | NC | 50958 | 7691 NANCY LN | Shepherds | NC | 50958 | ||
ABC132 | Antoine Who | Antoine | Who | 939 Francis Ave | Shepherds | NC | 50914 | 939 E FRANCIS AVE APT 8 | Shepherds | NC | 50914 | ||
ABC133 | Joshua Reeves | Joshua | Reeves | 1698 Kerrick Ln | Shepherds | NC | 50958 | 7319 AUSTINWOOD RD | Shepherds | NC | 50914 | ||
ABC134 | Zachariah & Brittany Soup | Zachariah | Soup | Brittany | Soup | 6118 Highgrade Dr | Shepherds | NC | 50991 | 6118 HIGHGRADE DR | Shepherds | NC | 50991 |
ABC135 | Clyda Green | Clyda | Green | 889 Mcbroom Dr | Shepherds | NC | 50914 | 889 MCBROOM DR | Shepherds | NC | 50914 | ||
ABC136 | Latoscia Civil | Latoscia | Civil | 7189 Spring Run Dr | Shepherds | NC | 50991 | 7189 SPRING RUN DR | Shepherds | NC | 50991 | ||
ABC137 | Thomas Tomtom | Thomas | Tomtom | 898 S Keats Ave | Shepherds | NC | 50906 | 898 S KEATS AVE | Shepherds | NC | 50906 | ||
ABC138 | Ju & Jeron Great | Ju | Great | Jeron | Great | 9191 Walter Ave | Shepherds | NC | 50915 | 9191 WALTER AVE | Shepherds | NC | 50915 |
ABC139 | Robt & Mary Salmon | Robt | Salmon | Mary | Salmon | 883 Marytena Dr | Shepherds | NC | 50914 | 883 MARYTENA DR | Shepherds | NC | 50914 |
<tbody>
</tbody>
Example of what data should look like AFTER macro:
ID# | BOTH-Names | First | Last | Street | City | State | Zip |
---|---|---|---|---|---|---|---|
ABC123 | Thomas Joneses | Thomas | Joneses | 1151 Glenhurst Ave | Shepherds | NC | 50916 |
ABC123 | Thomas Joneses | Thomas | Joneses | 8189 CHRISTIAN CT APT 893 | Shepherds | NC | 50922 |
ABC124 | Fidel & Maria Smartie | Fidel | Smartie | 5991 Braidwood Dr | Shepherds | NC | 50919 |
ABC124 | Fidel & Maria Smartie | Maria | Smartie | 5991 Braidwood Dr | Shepherds | NC | 50919 |
ABC125 | Jackie & Christina Spitter | Jackie | Spitter | 5718 Midnight Ln | Shepherds | NC | 50929 |
ABC125 | Jackie & Christina Spitter | Christina | Spitter | 5718 Midnight Ln | Shepherds | NC | 50929 |
ABC126 | Donald Lulu | Donald | Lulu | 9118 Galene Dr | Shepherds | NC | 50999 |
ABC127 | George & Dorothy Hard | George | Hard | 1811 Libby Ln | Shepherds | NC | 50972 |
ABC127 | George & Dorothy Hard | Dorothy | Hard | 1811 Libby Ln | Shepherds | NC | 50972 |
ABC127 | George & Dorothy Hard | George | Hard | 7816 RUTLEDGE RD | Shepherds | NC | 50958 |
ABC127 | George & Dorothy Hard | Dorothy | Hard | 7816 RUTLEDGE RD | Shepherds | NC | 50958 |
ABC128 | Samantha Davenport | Samantha | Davenport | 7919 Black Walnut Cir | Shepherds | NC | 50929 |
ABC129 | Jackie Katnip | Jackie | Katnip | 3399 Ethelwood Dr | Shepherds | NC | 50999 |
ABC130 | Mary Smithie | Mary | Smithie | 8985 Dogoon Dr | Shepherds | NC | 50923 |
ABC131 | Wanda Chef | Wanda | Chef | 6817 Carolina Ave | Shepherds | NC | 50958 |
ABC131 | Wanda Chef | Wanda | Chef | 7691 NANCY LN | Shepherds | NC | 50958 |
ABC132 | Antoine Who | Antoine | Who | 939 Francis Ave | Shepherds | NC | 50914 |
ABC132 | Antoine Who | Antoine | Who | 939 E FRANCIS AVE APT 8 | Shepherds | NC | 50914 |
ABC133 | Joshua Reeves | Joshua | Reeves | 1698 Kerrick Ln | Shepherds | NC | 50958 |
ABC133 | Joshua Reeves | Joshua | Reeves | 7319 AUSTINWOOD RD | Shepherds | NC | 50914 |
ABC134 | Zachariah & Brittany Soup | Zachariah | Soup | 6118 Highgrade Dr | Shepherds | NC | 50991 |
ABC134 | Zachariah & Brittany Soup | Brittany | Soup | 6118 Highgrade Dr | Shepherds | NC | 50991 |
ABC135 | Clyda Green | Clyda | Green | 889 Mcbroom Dr | Shepherds | NC | 50914 |
ABC136 | Latoscia Civil | Latoscia | Civil | 7189 Spring Run Dr | Shepherds | NC | 50991 |
ABC137 | Thomas Tomtom | Thomas | Tomtom | 898 S Keats Ave | Shepherds | NC | 50906 |
ABC138 | Ju & Jeron Great | Ju | Great | 9191 Walter Ave | Shepherds | NC | 50915 |
ABC138 | Ju & Jeron Great | Jeron | Great | 9191 Walter Ave | Shepherds | NC | 50915 |
ABC139 | Robt & Mary Salmon | Robt | Salmon | 883 Marytena Dr | Shepherds | NC | 50914 |
ABC139 | Robt & Mary Salmon | Mary | Salmon | 883 Marytena Dr | Shepherds | NC | 50914 |
<tbody>
</tbody>
(Note that a link to a file with all the example data can be found above)