Forum Discussion

Andrej_J's avatar
Andrej_J
Copper Contributor
Oct 17, 2023
Solved

subtract filtered data - need help with formula

Hello. I need some help 🙂   I want a functional formula in column E (difference) where, after filtering by machine in column B (machine no), the program will recognize and subtract hou...
  • HansVogelaar's avatar
    HansVogelaar
    Oct 18, 2023

    Andrej_J 

    LOOKUP and VLOOKUP are limited compared to XLOOKUP.

    Try this in E2. It is an array formula, to be confirmed by pressing Ctrl+Shift+Enter.

    Then fill down.

     

    =IF(MAX((B$1:B1=B2)*ROW(B$1:B1))=0,"",D2-INDEX(D$1:D1, MAX((B$1:B1=B2)*ROW(B$1:B1))))

Resources