+ Reply to Thread
Results 1 to 14 of 14

"Reverse " Pivot Table

  1. #1
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    "Reverse " Pivot Table

    Hi,
    I am trying, starting from a list that has the same structure as a Pivot Table, to recreate the list it was derived from.

    I added a sample to show what I mean.
    Many thanks for your help
    Attached Files Attached Files
    Last edited by Pepe Le Mokko; 05-15-2009 at 04:26 AM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: "Reverse " Pivot Table

    that wont open!
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: "Reverse " Pivot Table

    Martin, I uploaded the file again

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: "Reverse " Pivot Table

    struggling!!!!!
    Last edited by martindwilson; 05-14-2009 at 01:31 PM.

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: "Reverse " Pivot Table

    If you create a running total you should be able to do it relatively easily I think.

    eg

    E2: =SUM(C1,E1)
    copy down for all rows (ie to E28)

    Formula to generate list then:

    J2: =LOOKUP(ROWS(J$2:J2)-1,$E$2:$E$28,A$2:A$28)
    copy to K2
    copy J2:K2 down as far as required

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: "Reverse " Pivot Table

    Thx, Donkey
    I'll try it out tomorrow and let you know

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: "Reverse " Pivot Table

    No problem - post back if you have any problems.

    Incidentally - to avoid confusion - the E2: =SUM(C1,E1) is deliberate (ie referencing row above)

  8. #8
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: "Reverse " Pivot Table

    Hi Donkey,
    works perfectly ! Brilliant as always !
    I'll just have to add a condition to stop the results when needed which shouldn't be hard.

    Thanks again

  9. #9
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: "Reverse " Pivot Table

    Yes - you could precede the test with a calculation based on ROWS processed versus SUM of items to be listed, ie

    J2: =IF(ROWS(J$2:J2)>MAX($E$2:$E$28),"",LOOKUP(ROWS(J$2:J2)-1,$E$2:$E$28,A$2:A$28))

    but obviously you're then repeating the MAX test over and over so would be better I think to store the MAX calc in one cell (say J1) and refer to it subsequently in the list formulae so as to reduce number of calcs being performed, eg:

    J1: =MAX($E$2:$E$28)
    J2: =IF(ROWS(J$2:J2)>$J$1,"",LOOKUP(ROWS(J$2:J2)-1,$E$2:$E$28,A$2:A$28))

  10. #10
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Re: "Reverse " Pivot Table

    Dear Experts ,
    Better to ask dumb questions rather do dumb mistake. So my question
    Table on the left has ACC appearing 9 times in column B and value sum is 10
    Now table on the right ACC count is 8 something is not right with original pivot table it seems
    Best Regards/VKS

  11. #11
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: "Reverse " Pivot Table

    VKS,

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  12. #12
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Re: "Reverse " Pivot Table

    Quote Originally Posted by arlu1201 View Post
    VKS,

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    My apologies Arlu,
    I don’t think I have posted any personal question on someone elses thread……. except asking for some clarification on original data and output data. I consider myself ok with pivot tables and wanting to learn more about them as I spend lot of time on pivot tables so I was looking at the problem from a different prespective.
    Please excuse me if I was not able to put my question in simple language as english is not my first language.
    Best Regards/VKS

  13. #13
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: "Reverse " Pivot Table

    Sorry VKS. I have reversed the infraction.

  14. #14
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    521

    Re: "Reverse " Pivot Table

    Thanks Arlu.
    Best Regards/VKS

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1