including is not blank in a function
Hi Wizards! I have a function to look for duplicate last names in a sheet; however, the cells will be blank as we start the project...it is returning "duplicate" in all of the blank cells which I don't want:
=IF(COUNTIFS([LAST NAME]:[LAST NAME], [LAST NAME]@row) > 1, "Duplicate")
I've tried to include IF([LAST NAME]<>""(rest of formula) but that is not working ...
Any help would be greatly appreciated!!!!
Best Answers
-
Hope you are fine, please try the following formula and convert it to a column format formula:
=IF(ISBLANK([LAST NAME]@row), "", IF(COUNTIFS([LAST NAME]:[LAST NAME], [LAST NAME]@row) > 1, "Duplicate"))
the following screen shot shows the result:
bassam.khalil2009@gmail.com
☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"
-
Hi thank you - this is great - i now need to look at the last name and first name; is it possible to have the range last name: first name and it will look at both columns to see if there are duplicates ?
Jon Doe (Duplicate)
Kathy B
Jon
Jon Doe (Duplicate
-
awesome, worked like a charm!
Answers
-
Hope you are fine, please try the following formula and convert it to a column format formula:
=IF(ISBLANK([LAST NAME]@row), "", IF(COUNTIFS([LAST NAME]:[LAST NAME], [LAST NAME]@row) > 1, "Duplicate"))
the following screen shot shows the result:
bassam.khalil2009@gmail.com
☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"
-
Bassam's nested IF() statement will work.
However, since you're already using COUNTIFS() which lets you use multiple criteria, why not add a second criterion to what you already have there, especially since you've already identified it?
Given, you don't want to count blanks, your criterion
[LAST NAME]@row <>""
is correct . Now all you need is the second range which happens to be the same[LAST NAME]:[LAST NAME]
.The format for COUNTIFS() is COUNTIFS(range1, criterion1, range2, criterion2, range_N, criterion_N).
Your revised formula would be...
=IF(COUNTIFS([LAST NAME]:[LAST NAME],[LAST NAME]@row,[LAST NAME]:[LAST NAME],[LAST NAME]@row<>"" )>1,"Duplicate")
-
Hi thank you - this is great - i now need to look at the last name and first name; is it possible to have the range last name: first name and it will look at both columns to see if there are duplicates ?
Jon Doe (Duplicate)
Kathy B
Jon
Jon Doe (Duplicate
-
I hope you're well and safe!
Try something like this.
- Add a so-called helper column (I named mine Join) to join together the First and Last Names.
=[First Name]@row + [Last Name]@row
- Add the following formula to the Duplicate Check column.
=IF(COUNTIFS(Join:Join, Join@row, Join:Join, <>"") > 1, "Duplicate")
Did that work/help?
I hope that helps!
Be safe and have a fantastic week!
Best,
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
✅Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
awesome, worked like a charm!
-
Excellent!
You're more than welcome!
✅Remember! Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.6K Get Help
- 433 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.9K Ideas & Feature Requests
- 143 Brandfolder
- 147 Just for fun
- 63 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 2 SmartStories
- 298 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!