Cross reference another sheet and filter the criteria

Dan K
Dan K ✭✭
edited 05/10/24 in Formulas and Functions

Looking for a formula to pull data from another sheet and add 2 filter criteria.

Here is my filter critera but not sure how to reference the source smartsheet.

=COUNTIFS([Client Mitigation Status]:[Client Mitigation Status], "Pending") + COUNTIFS(SBG:SBG, "AERO")

Tags:

Answers

  • Jgorsich
    Jgorsich ✭✭✭✭

    When you start entering a formula, after opening the parenthesis, there will be a popup that has a link to reference another smartsheet - from a mechanical point of view, you click that, then select the sheet you want, then select the portion of the sheet you want, then (if you want to prevent headaches in the future) you rename your selection and press enter.

  • Dan K
    Dan K ✭✭

    =COUNTIFS({SHEET REFERENCE}(SBG:SBG, "AERO" + {SHEET REFERENCE}(client mitigation status:client mitigation status, "pending"))

    Something like this?

  • Jgorsich
    Jgorsich ✭✭✭✭

    @Dan K - close, but you are missing some commas there.

    The tool tip when entering the formula should note that countifs works like this:

    =Countifs(range1, test1, range2, test2, etc).

    Those ranges are typically columns or portions of columns (I THINK you can do rows also, but I've never tried it) and have to cover the same number of rows - what it is ultimately counting is the number of rows where ALL of the conditions are met.

    So, you've got this:

    COUNTIFS({SHEET REFERENCE}(SBG:SBG, "AERO" + {SHEET REFERENCE}(client mitigation status:client mitigation status, "pending"))

    I think what you are TRYING to do is check for rows where "Aero" appears in column SBG AND "pending" appears in your column "client mitigation status" in the second sheet. If that is the goal, your current formula is going to give you an error.

    What you want to do is start typing "=countifs(". Once you do that, you should get the tool tip and the ability to reference another sheet. Click on that, find your other sheet, select your SBG column and (presuming your sheet is called SecondSheet) you'll see in the upper left portion of the window the name "SecondSheet Range1" - change that to "SecondSheet_SBG" and click okay. Now you'll have this: "=countifs({SecondSheet_SBG}". At this point you want to add a comm and your criteria and another comma: "=countifs({SecondSheet_SBG},"AERO",".

    Now you want to AGAIN click the reference another sheet button and select your "client mitigation status" column and rename it to "SecondSheet_CMS" and hit okay. Then add your criteria for that as well and close your countifs - it should ultimately look like this: =countifs({SecondSheet_SBG},"AERO",{SecondSheet_CMS},"pending")

    Then you should be good :)

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!