+ Reply to Thread
Results 1 to 7 of 7

Using IF statement with GETPIVOTDATA

  1. #1
    Registered User
    Join Date
    07-24-2008
    Location
    Wasington DC
    Posts
    4

    Cool Using IF statement with GETPIVOTDATA

    Hell all;

    I have an excel spreadsheet that is linked to a pivot table. The cell will reflect what ever the pivot reference link is behind it.
    Here's my problem, if the link doesn't exist (Null) I want the cell to reflect "0" (Zero).
    I assumed the following formula work but it doesn't

    =IF(=GETPIVOTDATA("SEAT AVAL",'ATRRS PIVOT'!$A$3,"MOS","13D1","FY","2009","QUARTER","Q1 ") Is Null, "0", =GETPIVOTDATA("SEAT AVAL",'ATRRS PIVOT'!$A$3,"MOS","13D1","FY","2009","QUARTER","Q1 "))


    Any ideas on how to make this work would be appreciated. Thanks

    Flynjack

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Does this work?

    Please Login or Register  to view this content.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    07-24-2008
    Location
    Wasington DC
    Posts
    4
    If allows me to enter this formula without any error prompts; however, the value of the field only shows #REF! regardless if the linked cell has a value or Is Null.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    This usually means one or more cell references in the formula are not valid? Have you ensured that they are all valid? For example I see a space after the Q1 reference... should there be one there?

  5. #5
    Registered User
    Join Date
    07-24-2008
    Location
    Wasington DC
    Posts
    4
    Thanks for the space cath after Q1. That was probably something that had to be fixed anyway. After making the correction I still receive the #REF! code. But this makes sense because "0" should only appear if there is no reference in the PIVOT chart. Is there a way of saying if "X" doesn't exist in a PIVOT, then show me "0", and if "X" does exit in the PIVOT show me what "X" is.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    I probably shouldn't admit this, but I don't play with PivotTables too much...but maybe this'll work?

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-24-2008
    Location
    Wasington DC
    Posts
    4
    You are a genious. It worked. Thanks.

+ 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