+ Reply to Thread
Results 1 to 18 of 18

Pivot table help

  1. #1
    Registered User
    Join Date
    08-16-2022
    Location
    atlanta ga
    MS-Off Ver
    excel 2021
    Posts
    36

    Pivot table help

    Hello,

    I would like some help converting this into a pivot table. There is about 20 columns which are my regions and i have events on the left. I need Q3,Q4, and 2H for all of them. How can i do a pivot to simplify this table and make selections
    ?
    Attached Files Attached Files

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

    Re: Pivot table help

    Hi which is your excel version please. Answers are tailored to the OP's version. Thanks

  3. #3
    Registered User
    Join Date
    08-16-2022
    Location
    atlanta ga
    MS-Off Ver
    excel 2021
    Posts
    36

    Re: Pivot table help

    excel version 2204

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Pivot table help

    Row 4 is filled with merged cells.

    I advice you not to work with merged cells.

    It is allowed to change those date?


    Excel version

    There is no excel version 2204.

    Do you mean 2021.

    If so, add that in your profile.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  5. #5
    Registered User
    Join Date
    08-16-2022
    Location
    atlanta ga
    MS-Off Ver
    excel 2021
    Posts
    36

    Re: Pivot table help

    I see, yes 2021.

    Could you send me a updated excel file how you would sort this then if its not with merged cells. and with the pivot table to have a understanding? Please & Thank you!

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Pivot table help

    With the VBA code below.

    Please Login or Register  to view this content.
    See the attached file.


    Please change the profile (as requested).
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-16-2022
    Location
    atlanta ga
    MS-Off Ver
    excel 2021
    Posts
    36

    Re: Pivot table help

    That works! Can you provide that same tabular view for this one filled out?
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Pivot table help

    See also the comments in the (same) threath below.

    https://www.excelforum.com/excel-cha...for-pivot.html



    Here the file with a button to run the code.

    See the attached file.
    Last edited by oeldere; 08-16-2022 at 02:12 PM.

  9. #9
    Registered User
    Join Date
    08-16-2022
    Location
    atlanta ga
    MS-Off Ver
    excel 2021
    Posts
    36

    Re: Pivot table help

    the data is pulling incorrectly, for example look at NY METRO and data is different

  10. #10
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Pivot table help

    the data is pulling incorrectly, for example look at NY METRO and data is different


    Is the point the names in the files are not the same?

    I copied the not merged cells from #6 into this file, so I did not have to change the merged cells.

    If that is the problem, change the date in row 2 and run the code again.

    Please reply afterwards.

  11. #11
    Registered User
    Join Date
    08-16-2022
    Location
    atlanta ga
    MS-Off Ver
    excel 2021
    Posts
    36

    Re: Pivot table help

    When i click on run it gives me error as well.

  12. #12
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Pivot table help

    Please post the amended file, so I can take a look.

  13. #13
    Registered User
    Join Date
    08-16-2022
    Location
    atlanta ga
    MS-Off Ver
    excel 2021
    Posts
    36

    Re: Pivot table help

    i changed the data and its still giviving me the wrong data for NJ METRO FIRE example

  14. #14
    Registered User
    Join Date
    08-16-2022
    Location
    atlanta ga
    MS-Off Ver
    excel 2021
    Posts
    36

    Re: Pivot table help

    the macro runs now but data is inccorect, for example choose region NJ METRO and Name FIRE & SAFTEY, the numbers are diffrenr

  15. #15
    Registered User
    Join Date
    08-16-2022
    Location
    atlanta ga
    MS-Off Ver
    excel 2021
    Posts
    36

    Re: Pivot table help

    i need them to tie out to this one
    Attached Files Attached Files

  16. #16
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Pivot table help

    I can't see what is going wrong if I don't have the file.

    Please also take the time to mark the other question solved.

    Please also add the office version in your profile (now you have excel)


    Please post the amended file, so I can take a look.

  17. #17
    Registered User
    Join Date
    08-16-2022
    Location
    atlanta ga
    MS-Off Ver
    excel 2021
    Posts
    36

    Re: Pivot table help

    look at line 27 NJ METRO, the file you provided and the one i provided the numbers are off for fire and safety

  18. #18
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Pivot table help

    You have to save the file as a xlsm file (macro's allowed).

    Otherwise the macro won't work.

    See the attached file and please reply

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 07-01-2019, 08:01 AM
  2. Replies: 7
    Last Post: 02-27-2017, 07:41 AM
  3. Replies: 6
    Last Post: 01-24-2017, 06:56 PM
  4. Automating Pivot table and pivot chart creation if data table names unknown
    By Vegiepie2016 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 02-04-2016, 11:52 AM
  5. Replies: 1
    Last Post: 07-29-2015, 05:19 PM
  6. Replies: 1
    Last Post: 07-29-2015, 05:15 PM
  7. Collapse/Expand - Pivot table Fields - Need equivalent option in Excel VBA Pivot table
    By ragavendraph in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2012, 03:00 PM

Tags for this Thread

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