help with a worksheet needed

S

snjrusse

I’m trying to fix a spreadsheet for a volunteer organization that has no
budget for software. I need some help. The first column is for the date the
activity took place. The second column is the activity that happened. The
next 15 columns are for the members, one column for each member. We put in
the date and activity as they happen then move across the row and put an X in
the column under the name of each member that attends the activity. I then
have a second sheet with a form that will give the members name and list the
activities that the member attended. I need that page to print 15 times, one
for each member, showing the activities and date that each member attended.
I don’t know how to write the print program so it will go to the first sheet
pick up the members name and print only the activities attended by that
person. Is there a program out there that I could adapt for this or is there
a formula that I could use to make this work? Any and all suggestions would
be appreciated.
 
D

Don Guillett

Send your workbook along with a snippet from this post and clear
instructions along with a proper result example.
Send to the address below
 
G

Gord Dibben

With your layout you could use Data>Autofilter on one sheet only.

Select the name Gord at top of column C And Data>Filter>Autofilter

Hit the arrow and Filter for "X".

You will see in column C just the dates and activities for Gord that had an 'X".

Hide the other name columns and print just Gord's dates and activities.

14 more times and you have 15


Gord Dibben MS Excel MVP
 
D

Don Guillett

try
Sub printeach()
Application.ScreenUpdating = False
lr = Cells(Rows.Count, "a").End(xlUp).Row
For i = 4 To Cells(1, Columns.Count).End(xlToLeft).Column
'MsgBox Cells(1, i).Value
If Application.CountIf(Columns(i), "x") > 0 Then
Sheets(3).Range("a11:c100").ClearContents
Range("A1:p" & lr).AutoFilter Field:=i, Criteria1:="x"
Range("A2:c" & lr).SpecialCells(xlCellTypeVisible).Copy _
Sheets(3).Range("a11")
Sheets(3).Range("b5") = Cells(1, i)
Sheets(3).PrintPreview 'change to .printOUT after testing
Range("A1:p1").AutoFilter
End If
Next i
Application.ScreenUpdating = True
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top