+ Reply to Thread
Results 1 to 10 of 10

Formula calculating in a moving cell

  1. #1
    Registered User
    Join Date
    07-22-2012
    Location
    The Shire
    MS-Off Ver
    Office 2013
    Posts
    51

    Formula calculating in a moving cell

    I have a sheet that has a Pivot table and a column with formulas, referencing cells in the pivot table.
    The problem is that the pivot table changes size and shape, depending on what values are filtered. When the pivot table changes all the formulas become invalid, since they are referencing a now empty cell.

    How can I make it that the formulas follow the cells?

  2. #2
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: Formula calculating in a moving cell

    you can add IFNA(current formula,"") to each cell and this will change to blank once filtered

  3. #3
    Registered User
    Join Date
    07-22-2012
    Location
    The Shire
    MS-Off Ver
    Office 2013
    Posts
    51

    Re: Formula calculating in a moving cell

    Nah, I need the formula to follow the cells and calculate based on their values.

  4. #4
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: Formula calculating in a moving cell

    If you post an example workbook I can take a look

  5. #5
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: Formula calculating in a moving cell

    In that case you should be able to use a lookup to search for the return you are looking for.

    Going to need a sample workbook detailing what you're trying to achieve and I'll take a look

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Formula calculating in a moving cell

    In the formulae, are you using cell references e.g.
    =I10-G9

    or structured references. e.g.:
    =GETPIVOTDATA("p2",$F$4)-GETPIVOTDATA("p2",$F$4,"Name","D","P1",1)

    In the attached, remove row label c by filtering... is this what you are seeing?
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  7. #7
    Registered User
    Join Date
    07-22-2012
    Location
    The Shire
    MS-Off Ver
    Office 2013
    Posts
    51

    Re: Formula calculating in a moving cell

    Thank you, PFDave and Glenn Kennedy!

    My situation is exactly the one Glenn Kennedy has described.
    I should have been more clear, I thought my matter simple enough to not need an example workbook.

    I know about the GETPIVOT function and it works, but I was wondering if there was another way - I thought for sure Excel would have a function that followed a cell, somewhat. So say I have that exact same pivot table and want my formula to follow the cells, without using the GETPIVOT function - is it possible?

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Formula calculating in a moving cell

    Nothing obvious occurs to me... so what's the problem with GETPIVOTDATA, as it does what you want???

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Formula calculating in a moving cell

    Regarding simplicity... A picture is worth 1000 words and a sample spreadsheet 1000 x 1000 words...

  10. #10
    Registered User
    Join Date
    07-22-2012
    Location
    The Shire
    MS-Off Ver
    Office 2013
    Posts
    51

    Re: Formula calculating in a moving cell

    Quote Originally Posted by Glenn Kennedy View Post
    Regarding simplicity... A picture is worth 1000 words and a sample spreadsheet 1000 x 1000 words...
    *giggidy*

    I'll just use the GETPIVOT function. It will work, as long as the chosen data isn't filtered out, right?

+ 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. Help on calculating moving average using DAX
    By kaka20461977 in forum Excel Charting & Pivots
    Replies: 14
    Last Post: 12-27-2013, 01:17 PM
  2. [SOLVED] Help Calculating A Simple Moving Average
    By artiststevens in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-13-2013, 11:40 PM
  3. Replies: 0
    Last Post: 05-21-2012, 06:59 AM
  4. Calculating a Moving Average - PivotTable
    By lufcluke in forum Excel General
    Replies: 2
    Last Post: 01-19-2011, 07:28 AM
  5. Calculating a Moving Average
    By agentred in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-13-2010, 01:30 PM
  6. Calculating dynamic moving averages
    By dmax007 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-07-2006, 04:30 PM
  7. calculating moving average
    By [email protected] in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-14-2006, 06:20 AM
  8. [SOLVED] calculating moving average
    By odey1234 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-29-2005, 10:06 AM

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