mardi 17 novembre 2020

Return Last non-blank Value of range that is determined by an Index, Match and IF lookup

I have a few bank accounts for a particular entity, and some accounts are of the same currency. How do I sum up the latest balance (ie. last non-blank cell) of each account by currency?

Tried using this: =INDEX(H:H,MATCH(MAX(IF(B:B=K3,A:A,0)),IF(E:E=M3,A:A,0),0))

Results:

  1. If there's >1 transaction on any particular day, the formula returns the 1st result (instead of last non-blank cell)
  2. Shows error when a balance's date of INR is earlier than USD (hence, the USD balance shows something but INR balance becomes #N/A)
  3. Formula shows error if there's no transactions for that month (the last month's end balance is labelled as Oct Ending Balance

Screenshot

Aucun commentaire:

Enregistrer un commentaire