ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I count cells that contain a number of charctors. (https://www.excelbanter.com/excel-worksheet-functions/209329-how-do-i-count-cells-contain-number-charctors.html)

Picman

How do I count cells that contain a number of charctors.
 
How do I count cells that contain a number of charctors or specific criteria.
i have a column of cells that contain a range of values and i want to count
only the cells that contain a specific type of value (PO-31233334/M8689901)
vs (31233376/M8694101). If this is not possible then I'd like to count cells
that contain a specific number of charactors (20).


Gary''s Student

How do I count cells that contain a number of charctors.
 
To count the number of values in column D that begin with PO:
=SUMPRODUCT((LEFT(D1:D100,2)="PO")*(D1:D100<""))

--
Gary''s Student - gsnu200812

T. Valko

How do I count cells that contain a number of charctors.
 
Try these:

=COUNTIF(A1:A100,"PO-31233334/M8689901")

Or, use a cell to hold the criteria:

F1 = PO-31233334/M8689901

=COUNTIF(A1:A100,F1)

To count cells that contain 20 characters:

=SUMPRODUCT(--(LEN(A1:A100)=20))


--
Biff
Microsoft Excel MVP


"Picman" wrote in message
...
How do I count cells that contain a number of charctors or specific
criteria.
i have a column of cells that contain a range of values and i want to
count
only the cells that contain a specific type of value
(PO-31233334/M8689901)
vs (31233376/M8694101). If this is not possible then I'd like to count
cells
that contain a specific number of charactors (20).




Picman

How do I count cells that contain a number of charctors.
 
Thanks, that worked to a certain extent but I do have some cells that meet
that criteria (begin with €œPO€) but are still invalid as they do not contain
the correct number of characters or begin with €œPO€ and are 20 characters in
length but do not meet a standard format (PO-7611189-0710/M895 vs.
PO-31245184/M8768901). The standard that I require to be met is
€œPO-########/M#######€ and any variances, including being case sanative, be
counted.

"Gary''s Student" wrote:

To count the number of values in column D that begin with PO:
=SUMPRODUCT((LEFT(D1:D100,2)="PO")*(D1:D100<""))

--
Gary''s Student - gsnu200812



All times are GMT +1. The time now is 04:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com