Macro that assigns and grouping data by header

Magoosball

Board Regular
Joined
Jun 4, 2017
Messages
70
Office Version
  1. 365
I'm trying to write a macro that will do the following.
Take a list of names and data and assign them to other people broken by header.

For example from the following list: Christine gets all the data associated with Mark and Matt. Dolores gets all the data associated with Barb and Mike. Janet gets everything associated with John and Luke.

See below example:

Matt1
8
Mark18
Luke18
John18
Mike18
Mark18
Mike18
Heidi18
Mike18
Matt18
Barb18
Barb18
Barb18
Mike18

<tbody>
</tbody>


Christine
Matt18
Matt18
Mark18
Mark18
Dolores
Barb18
Barb18
Barb18
Mike18
Mike18
Mike18
Janet
John18
John18
John18
Luke18
Luke18

<tbody>
</tbody>


How would I go about doing this?
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
I was considering creating a separate sheet with the headers Christine, Dolores and Janet on it. Then saying if a1=Matt then copy a1-a8, vlookup Christine on sheet 2 and pasting underneath.
Is there a better way?
 
Upvote 0

Forum statistics

Threads
1,215,455
Messages
6,124,937
Members
449,196
Latest member
Maxkapoor

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top