Hi experts,
I'm a complete newbie and have searched the internet for some time trying to find sample vba scripts helping me achieve my goal. In order to explain what I need, please also see the attached workbook. In short, I have a worksheet containg names of partipants in monthly activities. The number and names (can) change per month. I also have "monthly worksheets" which basically list the type of activities, the costs hereof and how the costs are divided over the participants.
I now manually copy and transpose the participants from sheet1 to each monthly sheet. What I would like to do is automatically copy the individual names from sheet 1 (participants) to each monthly worksheet and when a "new" name is added in row 4 of a monthly-sheet (in the attached workbook for month Feb f) I would like to copy the contents of the preceeding column (from row 5 down to row 69). Actually since all columns are the same, it doesn't have to be the preceeding column but any column from H onward can be used. I can't find the correct formula to achieve this copy-action
I do already use a vba script which deletes the column if a cell in row 4 turns up empty. Thus, the sheet for August (where a and b no longer participate and therefor return cells h4 and i4 empty) will, after executing the macro, delete the entire columns h and i. The following vba script is taken from the original workbook:
Sub del()
Dim i As Integer
With Sheets("Jan")
For i = 141 To 8 Step -1
If IsEmpty(.Cells(4, i)) Or .Cells(4, i) = "" Then
.Cells(4, i).EntireColumn.Delete
End If
Next
End With
End Sub
I would be very grateful if anyone could help me automate the copy/transpose participants names and fill the costs/formula column in case a new participant starts participating.
Bookmarks