zachary217
New Member
- Joined
- Mar 16, 2014
- Messages
- 2
Hi all,
This is my first time posting, so apologies if I don't articulate what I'm looking for perfectly. I have a set of data that gives people scores based on various metrics in a grid and would like to email people who receive a score greater than 0 in any of the categories. I've come to understand that I can use mailmerge and microsoft word to do this; however, I would like to write a macro to format the data I have in excel to be in a way that's easy to use the mailmerge function with, which is where I'm stuck. Here is a picture of a sample of the type of data I have, followed by how I currently have it organized based on a macro I've currently written, and then a sample of how I'd like it to look, which could be done by using either the data in the first or second examples, whichever is easier:
Original Data:
<tbody>
</tbody>
How I've sorted it in a separate worksheet using a macro:
<tbody>
</tbody>
This is how I'd like it to look (using either of the first two tables):
<tbody>
</tbody>
Any suggestions/actual VBA code would be much appreciated. Thanks!
This is my first time posting, so apologies if I don't articulate what I'm looking for perfectly. I have a set of data that gives people scores based on various metrics in a grid and would like to email people who receive a score greater than 0 in any of the categories. I've come to understand that I can use mailmerge and microsoft word to do this; however, I would like to write a macro to format the data I have in excel to be in a way that's easy to use the mailmerge function with, which is where I'm stuck. Here is a picture of a sample of the type of data I have, followed by how I currently have it organized based on a macro I've currently written, and then a sample of how I'd like it to look, which could be done by using either the data in the first or second examples, whichever is easier:
Original Data:
Name | Basketball | Baseball | Tennis |
a | 3 | 2 | 1 |
b | 4 | 2 | |
c | 1 | 1 | |
d | 3 | ||
e | 4 | ||
f | 5 | ||
g | 2 | 6 | |
h | |||
i | |||
j | |||
k | 2 | ||
l | |||
m | 1 | ||
n | |||
o | 3 |
<tbody>
</tbody>
How I've sorted it in a separate worksheet using a macro:
Basketball | Level | Baseball | Level | Tennis | Level |
a | 3 | a | 2 | a | 1 |
c | 1 | b | 4 | b | 2 |
g | 2 | k | 2 | c | 1 |
m | 1 | d | 3 | ||
o | 3 | e | 4 | ||
f | 5 | ||||
g | 6 |
<tbody>
</tbody>
This is how I'd like it to look (using either of the first two tables):
Name | Level | Sport |
a | 3 | Basketball |
c | 1 | Basketball |
g | 2 | Basketball |
a | 2 | Baseball |
b | 4 | Baseball |
k | 2 | Baseball |
m | 1 | Baseball |
o | 3 | Baseball |
a | 1 | Tennis |
b | 2 | Tennis |
c | 1 | Tennis |
d | 3 | Tennis |
e | 4 | Tennis |
f | 5 | Tennis |
g | 6 | Tennis |
<tbody>
</tbody>
Any suggestions/actual VBA code would be much appreciated. Thanks!
Last edited: