+ Reply to Thread
Results 1 to 4 of 4

Error on complicated Vlookup/GetPivotData Formula

  1. #1
    Registered User
    Join Date
    10-18-2016
    Location
    Frankfurt, Germany
    MS-Off Ver
    2010
    Posts
    82

    Error on complicated Vlookup/GetPivotData Formula

    Hi, I am trying turn a rota into an automatic rota where it fills itself when data is dumped into another worksheet and updated via pivot tables. Thier shifts are already pre-set from another worksheet with shift codes linking to the rota tab via vlookup.

    The outcomes on the rota are; in, late, sick, awol, unpaid and rdo (rest day off) - whilst referring to the relevant dates... my formula returns errors or #value. Below are 2 formulas I tried. I don't have the file to share as it is at work on not allowed. What Am I Doing Wrong???

    1-- =IFERROR(GETPIVOTDATA("Agent Name",'Absence Log'!$F$1,"Agent Name",$D16,"Type","AWOL","Date of event",MV$5),IFERROR(GETPIVOTDATA("Agent Name",'Absence Log'!$K$1,"Agent Name",$D16,"Type","Sick","Date of event",MV$5),IFERROR(GETPIVOTDATA("Agent Name",'Absence Log'!$P$1,"Agent Name",$D16,"Type","Unpaid","Date of event",MV$5),IF(GETPIVOTDATA("Agent Name",'Late Pivot'!$A$1,"Period",MV$5,"Full Name",$D16,"in","To look at"))))


    2-- =IF(VLOOKUP(MS15,'Shift Codes'!A:L,7FALSE)="RDO","RDO",IFERROR(GETPIVOTDATA("Agent Name",'Absence Log'!$K1$,"Agent Name",$D15,"Type,"Sick",Date of event",MU$5)>0,"sick"),IFERROR(IF(GETPIVOTDATA("Agent Data",'Absence Log!$F1$1,"Agent Name",$D15,"Type","AWOL","Date of event",MU$5)>0,","AWOL"),IFERROR(IF(GETPIVOTDATA("Agent Name",'Absence Log'!$P$1,"Agent Name",$D15,"Type","Unpaid","Date of event",MU$5)>0,"Unpaid",""),""))))

    I will be so grateful to whoever could solve this

  2. #2
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2308
    Posts
    1,472

    Re: Error on complicated Vlookup/GetPivotData Formula

    first thing i see in the first one is you have an IF statement at the end instead of an iferror
    =IFERROR(GETPIVOTDATA("Agent Name",'Absence Log'!$F$1,"Agent Name",$D16,"Type","AWOL","Date of event",MV$5),IFERROR(GETPIVOTDATA("Agent Name",'Absence Log'!$K$1,"Agent Name",$D16,"Type","Sick","Date of event",MV$5),IFERROR(GETPIVOTDATA("Agent Name",'Absence Log'!$P$1,"Agent Name",$D16,"Type","Unpaid","Date of event",MV$5),IFerror(GETPIVOTDATA("Agent Name",'Late Pivot'!$A$1,"Period",MV$5,"Full Name",$D16,"in","To look at"),0))))

  3. #3
    Registered User
    Join Date
    10-18-2016
    Location
    Frankfurt, Germany
    MS-Off Ver
    2010
    Posts
    82

    Re: Error on complicated Vlookup/GetPivotData Formula

    Hi, yes that was put there on purpose. Would taking that out take away the error and give me the return I am looking for, in theory?

    Just FYI, They are not 2 separate formulas. They are 2 different attempts to return the desired values/text

  4. #4
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2308
    Posts
    1,472

    Re: Error on complicated Vlookup/GetPivotData Formula

    im just looking at attempt one... the way you have your formula set up is get the pivot data for AWOL and if theres an error get the pivot data from SICK..etc etc until you get to the end where you have the beginning of an if statement stating "IF pivotdata to look at" with 0 logical statement and 0 true or false answers for the logical statement... Does my formula in my above post work? its hard to see if it works on my end because i dont have access to this workbook.

+ 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. GETPIVOTDATA() #REF! Error
    By goss in forum Excel Charting & Pivots
    Replies: 17
    Last Post: 10-20-2016, 10:32 PM
  2. Error issue vlookup Simple but complicated
    By JayReina in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 07-30-2013, 08:22 PM
  3. [SOLVED] complicated INDEX (or VLOOKUP?) formula [now with attachment!]
    By BHammy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-10-2012, 05:15 PM
  4. [SOLVED] complicated INDEX (or VLOOKUP?) formula
    By BHammy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-08-2012, 07:08 PM
  5. Excel 2007 : GETPIVOTDATA Ref Error
    By MargaretParry in forum Excel General
    Replies: 2
    Last Post: 03-14-2012, 12:28 PM
  6. #REF error when using getpivotdata within a vlookup
    By dcgrove in forum Excel General
    Replies: 1
    Last Post: 12-29-2009, 06:52 PM
  7. VBA GetPivotData error
    By zonino in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-14-2009, 01:56 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