If AND Countifs formula help

Hi - Trying to have a boxed checked if info from 2 fields on a row on sheet A are found on sheet B in the same row.
=IF(AND(COUNTIFS({UCA Vendor}, [Vendor]@row, {UCA E#}, [E #]@row, >0, 1, 0)))
So IF data in "UCA Vendor" on sheet B matches "vendor" on sheet A....AND "UCA E#" on sheet B matches "E#" on sheet A - check the box.
Hopefully the fields don't need to be combined on both sheets for this to work???
Best Answer
-
I think you've actually overcomplicated it, which is good because it is much easier to simplify than to add complexity.
COUNTIFS in Smartsheet formulas is, by its nature, and AND formula. What you're doing is saying COUNT IF a AND IF b. So you don't need the AND function for the formula at all. I think what you're looking for is:
=IF(COUNTIFS({UCA Vendor}, [Vendor]@row, {UCA E#}, [E #]@row) > 0, true, false)
Answers
-
I think you've actually overcomplicated it, which is good because it is much easier to simplify than to add complexity.
COUNTIFS in Smartsheet formulas is, by its nature, and AND formula. What you're doing is saying COUNT IF a AND IF b. So you don't need the AND function for the formula at all. I think what you're looking for is:
=IF(COUNTIFS({UCA Vendor}, [Vendor]@row, {UCA E#}, [E #]@row) > 0, true, false)
-
worked perfectly, thanks for the explanation
-
No problem, glad it's working.
Help Article Resources
Categories
Check out the Formula Handbook template!