"Count non blanks" if cells don't equal certain values

T

thegymshoe

I need to figure out a formula that counts the non blanks in a row, but omits
non blanks equalling "UA", "UE" and "AA".
Can anyone give me a simple formula please, I've tried all sorts of IFs,
AND's and MAYBE's thanks!
 
S

Sheeloo

If you want to exclude only the three values you mentioned then try
=COUNTA(B1:B9)-COUNTIF(B1:B9,"EE")-COUNTIF(B1:B9,"UA")-COUNTIF(B1:B9,"UE")

You can comeup with more elegant formulas but all of them will essentially
do the same process...

Adjust the range according to your data.

Click 'Yes' if this helped.
 
G

Gary''s Student

=256-COUNTBLANK(1:1)-COUNTIF(1:1,"AA")-COUNTIF(1:1, "UE")-COUNTIF(1:1,"UA")
 
T

thegymshoe

If I have 8 values I need to omit, this might be quite longwinded - is there
any way of condensing it so that you only need to put the range in twice?

Thanks
 
R

RagDyeR

Replace the characters within the quotes with your values and adjust for
your ranges:

=COUNTA(A1:Z1)-SUM(COUNTIF(A1:Z1,{"AA","BB","CC","DD","EE","FF","GG","HH"}))
--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================


If I have 8 values I need to omit, this might be quite longwinded - is there
any way of condensing it so that you only need to put the range in twice?

Thanks
 
T

thegymshoe

Sorry must have posted it wrong - how do you include everyone in the reply?
As you can see Im new to this!

The answer is what I'm looking for - excellent thanks
 
R

RagDyer

Don't understand your comment ... I don't see anything wrong with your
posting!

Anyway, you're welcome and thank you for the feed-back.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top