=COUNTIF

Colt_Fisher_43

New Member
Joined
Jan 1, 2020
Messages
18
Office Version
  1. 2013
Platform
  1. Windows
Hello,

I have a working formula =COUNTIF(E2:H2,"<>Adams")

How would I add another name like "Davis" so it'll work with both names and remove duplicates?

Thank you
 
Glad to help & thanks for the feedback.
Okay, I hope this is the last time I have a question, so I apologize in advance. If one of those columns is left blank how would I add a null or make sure it doesn't count a name if left empty in one of those columns?

=SUBSTITUTE(TRIM(SUBSTITUTE(SUBSTITUTE(E2&" "&F2&" "&G2&" "&H2,"Adams",""),"Davis",""))," ",", ")
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
I'm afraid I have no idea what you are asking.
 
Upvote 0
That's fine. (y)
I attached a screen shot, I didn't see where I could upload an excel file. If I leave column "B" empty it's still counting it in the total in column "F" using this formula. I'm trying not to count a blank in column "F". I hope this helps

Formula in column "F" =COUNTIFS(A2:D2,"<>Adams",A2:D2,"<>Davis")
 

Attachments

  • Post 2.JPG
    Post 2.JPG
    21.2 KB · Views: 6
Upvote 0
How about
Excel Formula:
=COUNTIFS(A2:D2,"<>Adams",A2:D2,"<>Davis",A2:D2,"<>")
 
Upvote 0
My pleasure.
Would I be able to remove duplicates with this formula? Let's say I don't want the name "Fisher" or any other names that I might enter in columns E2:H2 to show up twice if they are entered in more than once in those columns?

=SUBSTITUTE(TRIM(SUBSTITUTE(SUBSTITUTE(E2&" "&F2&" "&G2&" "&H2,"Davis",""),"Adams",""))," ",", ")
 
Upvote 0
No you couldn't substitute will remove all of them.
 
Upvote 0

Forum statistics

Threads
1,217,357
Messages
6,136,088
Members
449,990
Latest member
orthodmd

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top