VBA code map values from pivot to excel table

Wafee

Board Regular
Joined
May 27, 2020
Messages
104
Office Version
  1. 2013
Platform
  1. Windows
Hi, can somone help me with below requirement.

I have a pivot table as below.

Book2.xlsx
ABC
3Senior ManagerManagerGrand Total
4Hari4863.99
5HariBAESSLER, CHRISTINA2719.49
6HariCASO, ANDREW T76
7HariGREGORY, LISA M709
8HariJOBERT, SEBASTIEN635
9HariKERCHER, TODD E40
10HariPAONE, KELLY M246
11HariREPER, LAURA L358.5
12HariVENKATRAMAN, SRINIVAS80
13Sam2103.72
14SamNAIR, GIRISH1143.72
15SamSARKAR, ASHIS720
16Sam(blank)240
17Murat2410.25
18MuratFUJINAMI, GARY G223
19MuratKRIER, RYAN210.5
20MuratPAFF, MARK D80
21MuratSCHANEL, BARBARA J524
22MuratSHARMA, RAJU70
23MuratTANUKU, NAGESWARA RAO900
24Murat(blank)402.75
25Grand Total9377.96
Sheet3



and blow as my output sheet.

Book2.xlsx
ABCDEFG
2Senior ManagerManager
3Sam4548.83695534941863.72
4SamNAIR, GIRISH1353.52141.52829.51143.72
5SamSARKAR, ASHIS1882.831842584.5720
6Hari4837.545674.683484.944863.99
7HariBAESSLER, CHRISTINA1902.042199.681883.942719.49
8HariCASO, ANDREW T2833404076
9HariGREGORY, LISA M1116.5290734709
10HariJOBERT, SEBASTIEN8201363170635
11HariREPER, LAURA L47471664358.5
12HariPAONE, KELLY M120216421246
13HariKERCHER, TODD E422944040
14HariVENKATRAMAN, SRINIVASNANANA80
15Hari(blank)80256132NA
16Murat4370.675155.41762.332410.25
17MuratFUJINAMI, GARY G205552174223
18MuratKRIER, RYAN439394.4120210.5
19MuratPAFF, MARK D406966.512080
20MuratSCHANEL, BARBARA J61456132524
21MuratTANUKU, NAGESWARA RAO22221266.5821900
22MuratKIRKWOOD, SARA M NA397NANA
23MuratSHARMA, RAJUNANANA70
24Murat(blank)484.671018495.33402.75
25Grand Total
Sheet2


I want to pull the numbers from pivot to my output and put it in column immediately after the last column in row 3 that contains data(In this case it is column "G" and output should start from G3 ). there will be three possible combinations.

1. only senior manager
2. Senior manager and manager
3.senior manager and blanks.

Grand total column in pivot might change in with every iteration in terms of position (It might move from column "C" to "F").
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top