View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
john john is offline
external usenet poster
 
Posts: 97
Default Excel VBA - Cells Counting Problem

if the length of the numeric part is fixed (say 3 digits)
you can break the text string into the numeric part and
then take the value of it and do a countif(range,"0") on
that

=value(right(cell,3) will give you the value of the 3
digits in the 3 rightmost positions of the cell (assuming
there are 3 digits of course). If the cell has no digits,
the result of the expression wil be zero and not picked up
by the countif.

John


-----Original Message-----
i know that to count the number of cells that contain any

text you can
use:
=COUNTIF(data,"*")

what if i want to differentiate the data as alphabetic

data and
alphanumeric data?
eg. COUNTIF(A1:D4,"*") returns 16 when all cells have

data like:
abc125 or abc

How do u differentiate data as alphanumeric (abc125) and

alphabethic
(abc) data?? PLs help me?


---
Message posted from http://www.ExcelForum.com/

.