DomoAvocado
New Member
- Joined
- Nov 15, 2021
- Messages
- 8
- Office Version
- 365
- Platform
- Windows
I am trying to create a printable report based on some pivot tables. I was able to get the original header started with header information but I need the program to add new lines for each job underneath each header.
wsJobPiv is the worksheet the Pivot Tables with specific Job Numbers and the Total amount of unique Job Numbers
Cell B1 is the cell used to filter the Job Numbers Pivot Table
Cell AB1 is the same but for total amount of unique Job Numbers
wsJobPiv is the worksheet the Pivot Tables with specific Job Numbers and the Total amount of unique Job Numbers
Cell B1 is the cell used to filter the Job Numbers Pivot Table
Cell AB1 is the same but for total amount of unique Job Numbers
VBA Code:
'Job Entry
wsJobPiv.Range("b1").Value = wsPiv.Range("b" & pRow).Value
wsJobPiv.Range("ab1").Value = wsPiv.Range("b" & pRow).Value
Dim jobCount As Long
jobCount = wsJobPiv.Range("aa4").Value
For jobcounter = 1 To jobCount
iRow = iRow + 1
'Job Number Entry
wsPrint.Range("i" & iRow).Value = wsJobPiv.Range("a" & jRow).Value
jRow = jRow + 1
Next jobcounter
wsJobPiv.PivotTables("pvtJobNum").ClearAllFilters
wsJobPiv.PivotTables("pvtJobCount").ClearAllFilters