Creating Macro to walk through a Pivot Table - Microsoft Community


i'm music publisher.  our administrator gives honkin' big database each fiscal half, containing revenue each of our ~300 songs.  in order use data, create pivot table.  in simplest form, is...

  • row = "song title", , within "song title" there "income type".
  • column = "sum of 'amount earned'".

my problem "income type" granular.  i'm interested in knowing, example, how performance royalties earned each song, there might 3-4 different "income types" represent different kinds of performance royalties. 

now, figure can create macro uses case statement total performance royalties earned song, but i'm not sure how walk through pivot table.  logically, want like..

for each "song title" in pivot table...

zero out "my royalty" counts...

for each "income type" in pivot table song...

execute case statement accrue totals "my royalty" types

next "income type"

record "my royalty" type totals outside pivot table

next "song title"

for each song, there might anywhere 1 twelve different "income types", , there might 300 songs.  so, questions:

  • how do "for each "song title" loop?
  • how do "for each "income type" loop?

i think can rest of macro.

thanks in advance.

moved from: office / excel / windows other / office 365 home

believe have right idea using pivot table. starting learn them myself, don't see need macro. should able total different royalties separately, generate row , column totals grand totals. should able use "slicers" allow narrow down reports specific types, , songs, , performers. suggest check out following links. think you'll find answer question in these webinas. there total of 6 free webinars, approx 1 hr each on various aspects of pivot tables. view, or @ least download them later viewing (because owners taking them off line soon). myonlinetraininghub 3 pivot table webinars - https://www.myonlinetraininghub.com/excel-dashboard-webinar-reg.htm myonlinetraininghub 1 power bi dashboard webinar - https://www.myonlinetraininghub.com/excel-dashboard-webinar-reg.htm#pbi_anchor myexcelonline 2 pivot table webinars - https://www.myexcelonline.com/free-excel-webinars


Office / Excel / Microsoft Office Programming / Office 365 Home



Comments

Popular posts from this blog

Getting ErrorCode: 120018 when trying to access Microsoft account - Microsoft Community

The message was sent to a distribution list ‎(DL)‎ - Microsoft Community

What is the Office 365 default group Mailbox Users ISV Access Enabled - Microsoft Community