View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
thegymshoe thegymshoe is offline
external usenet poster
 
Posts: 3
Default "Count non blanks" if cells don't equal certain values

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

"Sheeloo" wrote:

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.

"thegymshoe" wrote:

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!