I have a pivot table that I've copied and pasted values onto another worksheet. In the pivot table exists part numbers in the row labels, dates in the column labels, and quantities in the values.
Annoyingly, I need to concatenate the corresponding part number's quantities with the date directly above. There are usually multiple quantities and dates in each part number so I'm struggling on figuring out how to do this. The formatting should ultimately look like this:
1125 7/11/2011, 509 9/01/2011, 103 12/31/2011, etc.
This should be in the cell to the right of the part number on another worksheet I'm creating to gather this data.
I've found a UDF someone created that will concatenate my a range of data i set, but i don't know how to implement the proper date that will be in the top row. Can anyone help with this?
Here is the UDF I found:
Annoyingly, I need to concatenate the corresponding part number's quantities with the date directly above. There are usually multiple quantities and dates in each part number so I'm struggling on figuring out how to do this. The formatting should ultimately look like this:
1125 7/11/2011, 509 9/01/2011, 103 12/31/2011, etc.
This should be in the cell to the right of the part number on another worksheet I'm creating to gather this data.
I've found a UDF someone created that will concatenate my a range of data i set, but i don't know how to implement the proper date that will be in the top row. Can anyone help with this?
Here is the UDF I found:
Code:
Function ConcatenateRange(Parts As Range, Separator As String)
' Build a single string from a passed range with a
' passed separator between each value
Dim strTemp, sepTemp As String
Dim cel As Range
Dim cnt As Integer
strTemp = ""
For Each cel In Parts.Cells
If cel.Value = "" Or cel.Value = 0 Then
sepTemp = ""
Else
sepTemp = Separator
End If
If Len(strTemp) = 0 Then
strTemp = cel.Value
Else
strTemp = strTemp & sepTemp & cel.Value
End If
Next cel
ConcatenateRange = strTemp
End Function