Run this macro with the pivot report sheet active:
Option Explicit
Sub DocReport()
'JBeaucaire (7/10/2009)
Dim FR As Long, LR As Long, NR As Long, i As Long, MyVal As String
FR = Cells.Find("Vendor ID").Row + 1
LR = Range("A" & Rows.Count).End(xlUp).Row - 1
NR = LR + 3
Range("A" & NR) = "Vendor ID"
Range("B" & NR) = "Document(s)"
For i = FR To LR
If Cells(i, "A") Like "*Total" Then
'Do nothing
ElseIf IsEmpty(Cells(i, "A")) Then
Cells(NR, "B") = Cells(NR, "B") & ";" & Cells(i, "D")
ElseIf Cells(i, "A") Like "EE*" Then
NR = NR + 1
Cells(NR, "A") = Cells(i, "A")
Cells(NR, "B") = Cells(i, "D")
End If
Next i
With Range("A" & LR + 4).CurrentRegion
.Font.Bold = True
.Font.ColorIndex = 3
.Select
End With
End Sub
Bookmarks