Index and match function not working with pivot tables

Anonymous
2022-10-29T08:23:04+00:00

Hi Experts,

I received #N/A error when using th formula =INDEX(H:H,MATCH(M4,A:A,0),MATCH(N2,B:B,0),MATCH(N3,C:C,0)) in the table. How the error should be rectified by using the index and match formula and I appreciate if someone tells the vba code to process this!

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. riny 20,530 Reputation points Volunteer Moderator
    2022-10-29T10:48:59+00:00

    Did some more testing. On a Pivot table this time. The PT headers cause a Value error when you multiply the first three arrays with H:H.

    Include an IFERROR inside the SUMPRODUCT like this:

    =SUMPRODUCT(IFERROR((A:A=M4)*(B:B=N2)*(C:C=N3)*H:H**,0)**)

    As said earlier, SUMIFS doesn't have this problem.

    2 people found this answer helpful.
    0 comments No comments

11 additional answers

Sort by: Most helpful
  1. Anonymous
    2022-10-29T09:56:25+00:00

    the above formula, still it doesn't work. I want to look up the value in H based on 3 criterias ; material, plant, storage location

    0 comments No comments
  2. riny 20,530 Reputation points Volunteer Moderator
    2022-10-29T10:09:38+00:00

    In an earlier screenshot you were looking at N2 and N3. Now these are N1 and N2 but you didn't adjust the formula!! But that should just result in a zero.

    Change the cell references and the formula should work. Perhaps you have a value error in any of the four columns referenced. Then SUMPRODUCT will throw out a value error as well. SIMIFS will work, though.

    0 comments No comments
  3. Anonymous
    2022-10-29T10:40:23+00:00
    0 comments No comments