Count if not a number

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a range of cells AI7:AT7 and I need a count to see if users made an
error by entering a blank, a space, a period ect. Where numbers should have
been enterd. I have tried several count variations and could not come up with
any thing.
 
Does;

=COUNT(AI7:AT7)=COUNTA(AI7:AT7)

which will return TRUE or FALSE doe what you want?
--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
That is almost what I want, but I need it to treat the blanks the same as it
treats a space or a coma
 
=COUNT(AI7:AT7)+SUM(ISBLANK(AI7:AT7))=COUNTA(AI7:AT7)+SUM(ISBLANK(AI7:AT7))

Agan TRUE or FALSE. If you want something else then use it as the test of
an IF() formula.
--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
Slightly shorter:

=SUM(COUNT(AI7:AT7),--ISBLANK(AI7:AT7))=SUM(COUNTA(AI7:AT7),--ISBLANK(AI7:AT7))

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
Try this:

=COUNT(AI7:AT7)=12
--

HTH,

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


That is almost what I want, but I need it to treat the blanks the same as it
treats a space or a coma
 
Still dosent work with the blanks, I tried this formula, but with the same
result.

=IF(COUNT(K1:K20)+(COUNTBLANK(K1:K20))=COUNTA(K1:K20)+(COUNTBLANK(K1:K20)),"NO","YES")
 
I beleive I have found it

=IF(COUNT(K1:K20)=COUNTA(K1:K20)+(COUNTBLANK(K1:K20)),"NO","YES")

is there any flaw in this formula, I have tried it with all of the invalid
characters I could thnk of, so far it works

Thanks for all of your help!
 
Peo Sjoblom said:
Or the more generic

=COUNT(AI7:AT7)=COLUMNS(AI7:AT7)
....

More generic still,

=COUNT(rng)=COLUMNS(rng)*ROWS(rng)

=COUNTIF(rng,"=")+COUNTIF(rng,"*")=0

=AND(ISNUMBER(rng)) [array formula]
 
Don't RagDyeR, Peo & Harlan's formulas work for you?

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
It seems to be 4 characters longer than your previous formula, Sandy? I
wondered whether you meant shorter in execution time, but I would have
doubted it.
--
David Biddulph

Sandy Mann said:
Slightly shorter:

=SUM(COUNT(AI7:AT7),--ISBLANK(AI7:AT7))=SUM(COUNTA(AI7:AT7),--ISBLANK(AI7:AT7))
....
 
So it is, I checked the lengths with LEN() but I must have confused the
returned numbers. In any case it is academic because it does not work.
RagDyeR, Peo & Harlan posted working formulas so I did not bother trying to
improve it.

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 
Back
Top