OR( ) for multiple criterion ranges within INDEX/COLLECT/SUMIFS

breso
breso ✭✭✭✭
edited 08/21/24 in Smartsheet Basics

Hello, any tips for using OR for multiple criterion ranges? The formula below outputs #INVALID DATA TYPE.

=INDEX(COLLECT({Task Name}, {Details}, <>"", OR({X Budget}, {Y Budget}), <>""), [Expense #]@row)

The goal is to only pull tasks into the new sheet that have a value for either budget type (X, Y).

Tags:

Answers

  • Matt Lynn-PCG
    Matt Lynn-PCG ✭✭✭✭✭✭

    @breso You can't do Or() around two ranges. You can do that around criteria. I think you'd need to do two separate index(collect()) , one per range, and maybe put those two in a if() to decide which of the two results you use as an output.

    Or you could put a helper on the sheet that was maybe called ORhelper. And in that column put a formula that said

    =if(or(not(isblank([X Budget]@row)),not(isblank([Y Budget]@row)),"X","")

    Then in your original formula above change it to:

    =INDEX(COLLECT({Task Name}, {Details}, <>"", {OrHelper},"X", [Expense #]@row)

    Certified Platinum Partner

    2023 Partner of the Year

    PrimeConsulting.com