Forum

Notifications
Clear all

count blank and special character

11 Posts
4 Users
0 Reactions
89 Views
(@rathanak)
Posts: 55
Trusted Member
Topic starter
 

Hy Mynda,

I have data in column A like from A1:A9

12 A1

13 A2

14 A3

-    A4

$  A5

# A6

@A7

    A8

20 A9

what formula to count blank nd special  characters like $,#,&,@...?

regards,

 
Posted : 22/12/2016 2:38 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Rathanak,

You can use this formula to count all cells that don't contain numbers, it's easier than trying to handle all sorts of special characters:

=SUMPRODUCT(--NOT(ISNUMBER(A1:A9)))

Mynda

 
Posted : 22/12/2016 5:55 am
(@rathanak)
Posts: 55
Trusted Member
Topic starter
 

Thanks Mynda

 
Posted : 22/12/2016 7:20 am
(@micky)
Posts: 2
New Member
 

A bit shorter formula would be:

=COUNTA(A1:A9)-COUNTIF(A1:A9,"")

Micky

 
Posted : 22/12/2016 11:05 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Micky,

Great to see you having a go, however that formula counts everything except the blank cell. Rathanak wants to also count the special characters.

If you wanted to make mine shorter you could always use:

=SUM(--NOT(ISNUMBER(A1:A9)))

And enter with CTRL+SHIFT+ENTER.

But I don't recommend array formulas unless you have to use them.

Mynda

 
Posted : 22/12/2016 9:28 pm
(@sunnykow)
Posts: 1417
Noble Member
 

Hi Mynda

When I looked at rathanak's question, I assumed that numbers and alphabets are to be excluded.

=SUMPRODUCT(--NOT(ISNUMBER(A1:A9))) will exclude numbers but what about alphabets and space/s in a cell (not blank cell) that are not special characters?

Sunny

 
Posted : 22/12/2016 9:43 pm
(@sunnykow)
Posts: 1417
Noble Member
 

Attached is the formula that I was working on but it is rather long when combined.

 
Posted : 22/12/2016 10:02 pm
(@rathanak)
Posts: 55
Trusted Member
Topic starter
 

Thanks Sunny, awesome

I so glad to learn it from you

Once again thanks Mynda

 
Posted : 23/12/2016 2:45 am
(@mynda)
Posts: 4761
Member Admin
 

In that case I'd probably cheat and use a formula like this:

=COUNTBLANK(B1:B9)-COUNT(A1:A9)

Assuming column B is empty.

In other words, count how many cells in the range A1:A9 don't contain numbers.

Mynda

 
Posted : 23/12/2016 6:40 am
(@rathanak)
Posts: 55
Trusted Member
Topic starter
 

Glad to learn

 
Posted : 23/12/2016 9:30 am
(@micky)
Posts: 2
New Member
 

Mynda Treacy said
Hi Micky,

Great to see you having a go, however that formula counts everything except the blank cell. Rathanak wants to also count the special characters.

If you wanted to make mine shorter you could always use:

=SUM(--NOT(ISNUMBER(A1:A9)))

And enter with CTRL+SHIFT+ENTER.

But I don't recommend array formulas unless you have to use them.

Mynda  

Hi,

Yes, I noticed some small TIPOs in my previous suggested formula.

As per the question - I assumed the OP has a mixed list of Numbers/Special Characters/empty cells.

For that I would try another formula, such as: =COUNT(A1:A9)+COUNTIF(A1:A9,"")

Micky

 
Posted : 24/12/2016 5:31 am
Share: