CountIF but not blanks
Hi everyone - sorry if this has already been asked and answered. But, i am trying to have a box checked if there is a duplicate entry. This is the formula i am using:
=IF(COUNTIF([FA Peoplesoft ID]:[FA Peoplesoft ID], [FA Peoplesoft ID]@row) > 1, 1, 0)
It works, but when i add the formula to the duplicate column all the way down the sheet it marks all blanks as duplicate - is there a way to exclude it counting blanks? We will be adding entries in time that we want the formula to apply to.
Thanks!
Best Answer
-
Lets start by changing your COUNTIF to a COUNTIFS and adding in some ISTEXT criteria.
=IF(COUNTIFS([FA Peoplesoft ID]:[FA Peoplesoft ID], AND(@cell = [FA Peoplesoft ID]@row, ISTEXT(@cell))) > 1, 1, 0)
Answers
-
Lets start by changing your COUNTIF to a COUNTIFS and adding in some ISTEXT criteria.
=IF(COUNTIFS([FA Peoplesoft ID]:[FA Peoplesoft ID], AND(@cell = [FA Peoplesoft ID]@row, ISTEXT(@cell))) > 1, 1, 0)
-
Thanks Paul! This worked. I just updated it to be ISNUMBER as it will be numbers entered into that field. Thanks again!
-
Happy to help! 👍️
-
@Paul Newcome I used your formula to help me solve the same issue. Needed one extra ")" before the ">". Thanks!
-
@Tim Meeks Glad you were able to adapt one of my solutions, but...
My solution above would actually throw an error if you added a 4th closing parenthesis before the ">".
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 149 Just for fun
- 69 Community Job Board
- 498 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!