Listing the date, activity and name on a rota

hurcuma

New Member
Joined
Oct 19, 2017
Messages
12
Hi

We prepare a rota where volunteers assist with activities at Church, we normally just give out the rota (an excel sheet), but a number of people volunteer for more than one thing.

What I would like to do is to to give them a printed list showing in chronological order the activity they are assigned to. (thinking if I can achieve a listing, I can do a mail merge from excel into word so that I can include some additional text.

The mail merge part I am fine with.

I am struggling with how to take the table below, and transform it to the example I have called output below, it will obviously need to repeat moving on the next volunteer in the table.


Assuming Headings is Row 1 with columns A through to G
DateDeaconVestibuleChurch amFront door Projection
Sunday
Car Park
07-JanM BondV BondR PedroG PedroR TownsendS Everton
14-JanR ColeB BondC ChaplinJ L-Rogers/J PatelR TownsendT Thompson
21-JanN SmithB&B SmithM RobertsL MuskM MurrayS Musk
28-JanA Hill A RogersM BondN ThompsonM MurrayN Smith
04-FebS EvertonB L-RogersJ HarperS MuskK TownsendW Brown
11-FebM BondC SmithH ThompsonT ThompsonR TownsendL Musk
18-FebR ColeM GallagherV RogersT LamontR TownsendM Bond
25-FebN SmithA BasharR MatthewsT MatthewsM MurrayT Lamont

Output
DateNameActivity
07-Jan M BondDeacon
28-Jan M BondChurch AM
11-Feb M BondDeacon
18-FebM BondCar Park


<colgroup><col><col><col span="2"><col><col><col></colgroup><tbody>
</tbody>
[TABLE="width: 636"]
<colgroup><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Would any one be able to help me out on this as I am stumped on where to start.

Many thanks [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
How about this:

simple modification to my original code:
Rich (BB code):
Sub Transfer (byval s as String)
    'Clear Output sheet
    Sheets("Output").Range("A2:C" & Rows.Count).ClearContents
    rowOutput = 2
    
    'Find lastrow
    lrInput = Sheets("Input").Range("A" & Rows.Count).End(xlUp).Row
    
    'Search for name passed through
    nm = s
    
    For r = 2 To lrInput 'loop through the rows
        For c = 2 To 7 'loop through columns B through G
            If Sheets("Input").Cells(r, c).Value = nm Then 'if name matches then transfer to Output
                Sheets("Output").Range("A" & rowOutput).Value = Sheets("Input").Range("A" & r).Value 'Date
                Sheets("Output").Range("B" & rowOutput).Value = nm 'Name
                Sheets("Output").Range("C" & rowOutput).Value = Sheets("Input").Cells(1, c).Value 'Activity
                rowOutput = rowOutput + 1
            End If
        Next c
    Next r
    'Here you will need to find a macro that does the printing action
End Sub

Then you create another macro below it that calls the one above:
Rich (BB code):
Sub Caller()
    lr = Range("A" & Rows.Count).End(xlUp).Row
    for I=60 to lr
        Call Transfer(Range("A" & I).value)
    Next I 
End Sub

Then your shape button will call the Caller macro
 
Last edited:
Upvote 0

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,636
Latest member
laura12345

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