Hi.
I have this:
=COUNTIF(A1:A5, {"<>String1","<>String2"})
How do I add "empty"? (cell range that doesn't contain "String1", "String2" or is empty)
PR
Hi.
I have this:
=COUNTIF(A1:A5, {"<>String1","<>String2"})
How do I add "empty"? (cell range that doesn't contain "String1", "String2" or is empty)
PR
Use CountIfs function. It allows two ranges and two criteria.
Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
Just when I think I am smart, I learn something new!
=COUNTIFS(A1:A5, "<>String1", A1:A5, "<>String2", A1:A5, "<>")
This works, thank you.
Is it possible to do it as an array, though?
COUNTIFS(A1:A5, {"<>String1", "<>String2", "<>"}) —> doesn't work
PR
Hmm, I'm not sure I understood that. Where do "String1" and "String2" go?
PR
maybe:
=SUMPRODUCT((A1:A9<>"string1")*(A1:A9<>"string2")*(A1:A9<>""))
edit:
Oops, I maded sum instead of count
Last edited by sandy666; 07-02-2018 at 12:59 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks