Formulas and Functions

Formulas and Functions

Ask for help with your formula and find examples of how others use formulas and functions to solve a similar problem.

How to count values if either of two conditions are true

I have two sheets: Sheet A and Sheet B

I would like to count the number of cells in Sheet A, Column A and Sheet B, Column B that have the value "Liver".

Both sheets are stored under the same folder.

Answers

  • ✭✭✭✭✭

    Hi, @Arundhati , the formula below will achieve that.

    =COUNTIF({Sheet A Column A}, "Liver") + COUNTIF({Sheet B Column B}, "Liver")

    ...where {Sheet A Column A} and {Sheet B Column B} are cross-sheet references to the corresponding columns in each sheet.

  • ✭✭✭✭

    Thanks Toufong, maybe the formula needs a little more detail. That one is not returning results.


    Here is what I am trying: =COUNTIF(OR(CONTAINS("Liver", {SheetA Range1}), CONTAINS("Liver", {SheetB Range2})), "Liver")


    This formula is in a third sheet that is performing similar countif functions for other values.

  • ✭✭✭✭

    Simplifying the formula has worked as always. I asked the formula to sum two countif statements and it worked :D

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!

Trending in Formulas and Functions

  • I'm trying to create a SUMIF formula that looks at the salesperson name in a column and adds up or totals their $ sales in another column. To ultimately show in Dashboard of Totals Sales by Salesperso…
    User: "Allan Z"
    Answered ✓
    9
    2
  • Good day Smartsheet Team, Getting an unparseable error on this formula: =IF($Name@row <> "",(SUMIFS({Expense}, {Period},1, {Type}, OR(@cell = "RES602782", @cell = "RES602497")),"") Trying to pull in a…
    User: "stratman"
    Answered ✓
    15
    2
  • I have a sheet that compiles all the responses from a form. The sheet has multiple start and end date columns, but only one start and one end date cell is NOT blank depending on the activity selected …
    User: "m_anderson"
    Answered ✓
    13
    2