Forum Discussion

Maddy1010's avatar
Maddy1010
Brass Contributor
Feb 08, 2023
Solved

another index match?

Source File has:  Type, Name, Account

Plant File has:  Type, Amounts per month

MA File has:  Name, Account

 

I would like to retrieve Amounts per month from Plant File, but there are no common feature between Plant File and MA File, only that Plant file has the Type, and MA file has the Name.

 

Is it possible to get the Amount from Plant File into MA file?

Hans Vogelaar

Sergei Baklan

  • Maddy1010 

    In C2 on the MA sheet:

     

    =IF($B2="","",INDEX(Plant!$B$2:$M$14,MATCH(INDEX(Source!$A$2:$A$23,MATCH($B2,Source!$C$2:$C$23,0)),Plant!$A$2:$A$14,0),MATCH(C$1,Plant!$B$1:$M$1,0)))

     

    Fill down and to the right.

    • Maddy1010's avatar
      Maddy1010
      Brass Contributor

      It mostly works now, so I am super thrilled. Just one thing though...it is picking up twice some line items in rows 16 and 18.

      • HansVogelaar's avatar
        HansVogelaar
        MVP

        Maddy1010 

        Accounts 3111166 and 311117 have the same type 'Group other sales' on the Source sheet.

        The Plant sheet only has type to identify an account, not the name of the account. So the formula returns the values for 'Group other sales' for both accounts.

        I don't see how we can avoid that...

Resources