Hi have i done this right as i get a #Name? error
i have put the follows code in the macro sheets and then in the cell at the end of the row for angel gear (as displayed above in image) i have put:
=concatmth(B4:T4,"Jul")
_______________________________________________________________________
Function ConcatMth(rng As Range, item As String)
Application.Volatile
For Each ce In rng
If ce <> "" And Sheets(rng.Parent.Name).Cells(1, ce.Column) = item Then
holder = holder & ce & ","
End If
Next ce
ConcatMth = Left(holder, Len(holder) - 1)
End Function
Function ConcatDay(rng As Range, item As String)
Application.Volatile
For Each ce In rng
If ce <> "" And Sheets(rng.Parent.Name).Cells(2, ce.Column) = item Then
holder = holder & ce & ","
End If
Next ce
ConcatDay = Left(holder, Len(holder) - 1)
End Function
______________________________________________________________________
what have i dont wrong please ??
i have put the follows code in the macro sheets and then in the cell at the end of the row for angel gear (as displayed above in image) i have put:
=concatmth(B4:T4,"Jul")
_______________________________________________________________________
Function ConcatMth(rng As Range, item As String)
Application.Volatile
For Each ce In rng
If ce <> "" And Sheets(rng.Parent.Name).Cells(1, ce.Column) = item Then
holder = holder & ce & ","
End If
Next ce
ConcatMth = Left(holder, Len(holder) - 1)
End Function
Function ConcatDay(rng As Range, item As String)
Application.Volatile
For Each ce In rng
If ce <> "" And Sheets(rng.Parent.Name).Cells(2, ce.Column) = item Then
holder = holder & ce & ","
End If
Next ce
ConcatDay = Left(holder, Len(holder) - 1)
End Function
______________________________________________________________________
what have i dont wrong please ??