Hi group,
I have a column within a spreadsheet that contains email addresses. Each row can have one (1) email address or it can have multiple email addresses (occasionally as many as 5 or 6 email addresses). As an example, the spreadsheet could look like this:
<tbody>
</tbody>
I need to create a macro that will:
1) if column A has only 1 email address, move that email to column B
2) if column A has multiple email addresses, break them apart and place the first email address in column B, the second email address in column C, the third email address in column D and so on.
The macro should make it look like this:
<tbody>
</tbody>
What would be the best way to do this? I've seen suggestions to use "Split", but truthfully I don't have a complete grasp of arrays and how they work. So I'm not sure how to code this. Therefore I am very open to your ideas and suggestions.
In advance, thanks for any help you can offer. I look forward to hearing from you.
Don
I have a column within a spreadsheet that contains email addresses. Each row can have one (1) email address or it can have multiple email addresses (occasionally as many as 5 or 6 email addresses). As an example, the spreadsheet could look like this:
A | B | C | D | E | F | G |
tom.kennedy@company.com | ||||||
StacyJohns@company.com; BrendaCobb@company.com; Jason.Anders@company.com; Robert.Morgan@company.com | ||||||
Brenda.Freeman@company.com; Karen.Hazen@company.com |
<tbody>
</tbody>
I need to create a macro that will:
1) if column A has only 1 email address, move that email to column B
2) if column A has multiple email addresses, break them apart and place the first email address in column B, the second email address in column C, the third email address in column D and so on.
The macro should make it look like this:
A | B | C | D | E | F | G |
tom.kennedy@company.com | tom.kennedy@company.com | |||||
StacyJohns@company.com; BrendaCobb@company.com; Jason.Anders@company.com; Robert.Morgan@company.com | StacyJohns@company.com | BrendaCobb@company.com | Jason.Anders@company.com | Robert.Morgan@company.com | ||
Brenda.Freeman@company.com; Karen.Hazen@company.com | Brenda.Freeman@company.com | Karen.Hazen@company.com |
<tbody>
</tbody>
What would be the best way to do this? I've seen suggestions to use "Split", but truthfully I don't have a complete grasp of arrays and how they work. So I'm not sure how to code this. Therefore I am very open to your ideas and suggestions.
In advance, thanks for any help you can offer. I look forward to hearing from you.
Don