+ Reply to Thread
Results 1 to 2 of 2

Can I calculate a year range using a formula in a pivot table?

  1. #1
    Registered User
    Join Date
    08-24-2009
    Location
    Sydney
    MS-Off Ver
    Excel 2007
    Posts
    9

    Can I calculate a year range using a formula in a pivot table?

    I use pivots regularly. I work with car data and I want to see if I can create a year range in a pivot table.

    The data for example looks like this
    Model year
    Corolla 1998
    Corolla 1999
    Corolla 2000
    Corolla 2001
    Corolla 2002
    Camry 1998
    Camry 1999
    Camry 2002



    My data is over 10,000 lines long so doing manually would take forever.

    I have the data in two columns. I put the make in the row label. This gives one line for Toyota. If I put the Year next to Make, I get one corolla and a line for each year.
    What I want would look like this

    Model Year range
    Camry 1998-2002
    Corolla 1998-2002 (Calculated based on the data).


    Does anyone have an idea if this is possible?

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Can I calculate a year range using a formula in a pivot table?

    Hi

    I doubt that you could do this using a pivot table. Best you could come up with would be a matrix that shows the model, and the year(s) that it exists.

    I think the only way you would be able to build this sort of output would be with code.

    Using the above data, shouldn't the output be more like

    Camry 1998 - 1999, 2002
    Corolla 1998 - 2002

    rylo

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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