+ Reply to Thread
Results 1 to 6 of 6

Correcting Time Periods for Pivot tables

  1. #1
    Registered User
    Join Date
    02-06-2015
    Location
    nyc
    MS-Off Ver
    2010
    Posts
    3

    Correcting Time Periods for Pivot tables

    Hello All.
    I am trying to come up with a formula that will help me correct certain data fields in an excel sheet. I am getting data that has metrics for stores during a certain period of time. I want to create a pivot table with this data but it is not correct yet. Stores A and B have the correct time period data for the pivot. Stores C and D need to show the the period that follows the existing period. Is there a formula or simpler way to do this? I am hoping to add an extra column with a formula that will display the existing period if the row is store A or store B, but will also display the following time period if the row contains store C or D. I have been manually correcting these time periods but the data is getting too large for that now. A sample is below. Store (column A), Period (Column B), and Correct Period (Column C). I am hoping to put the formula in column C and use that column for the pivot. I have attached a sample. Thank you so much!!!


    Column A - Column B - Column C
    Store - Period - Correct Period
    Store A - FY15 Period 9 - FY15 Period 9
    Store B - FY15 Period 10 - FY15 Period 10
    Store C - FY16 Period 2 - FY16 Period 3
    Store D - FY15 Period 3 - FY15 Period 4
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Correcting Time Periods for Pivot tables

    You can use this formula in C2:

    =IF(OR(A2="Store A",A2="Store B"),B2,LEFT(B2,12)&RIGHT(B2,2)+1)

    then copy down.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    02-06-2015
    Location
    nyc
    MS-Off Ver
    2010
    Posts
    3

    Re: Correcting Time Periods for Pivot tables

    Pete, thank you for the quick reply. The Periods represent months. Is there a way for this to work so that the formula puts out FY16 Period 1 when FY15 Period 12 is in column B?

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Correcting Time Periods for Pivot tables

    Use this formula instead:

    =IF(OR(A2="Store A",A2="Store B"),B2,IF(RIGHT(B2,2)="12","FY"&MID(B2,3,2)+1&" Period 1",LEFT(B2,12)&RIGHT(B2,2)+1))

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    02-06-2015
    Location
    nyc
    MS-Off Ver
    2010
    Posts
    3

    Re: Correcting Time Periods for Pivot tables

    Thanks Pete! Is it possible to give back FY15 Period 09 instead of FY15 Period 9?

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Correcting Time Periods for Pivot tables

    This will change the Store A and Store B values to that format as well:

    =IF(OR(A2="Store A",A2="Store B"),LEFT(B2,12)&TEXT(RIGHT(B2,2)+0,"00"),IF(RIGHT(B2,2)="12","FY"&MID(B2,3,2)+1&" Period 01",LEFT(B2,12)&TEXT(RIGHT(B2,2)+1,"00")))

    Hope this helps.

    Pete

+ 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. [SOLVED] Correcting Time Format
    By jfezell in forum Excel General
    Replies: 6
    Last Post: 04-10-2014, 05:59 PM
  2. Run Time Error - 1004 / Pivot Tables
    By srikanthbenoni in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-03-2012, 03:00 PM
  3. Excel 2007 : Time tracking in Pivot Tables
    By Audrey Jacobs in forum Excel General
    Replies: 0
    Last Post: 02-22-2011, 12:02 PM
  4. Trying out pivot tables for the first time...
    By Remedial in forum Excel General
    Replies: 3
    Last Post: 10-10-2008, 07:08 AM
  5. [SOLVED] pivot tables - how can i set one up with data points over time?
    By Christopher in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-27-2006, 02:55 PM

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