# COUNTING TEXT IN COLUMNS [closed]

I have columns with a mixture of text and numbers eg

CM71846 CF21546 CM78946 CF12456 CF24566

How can I count the number of CF and number of CM please

First time here? Check out the FAQ!

COUNTING TEXT IN COLUMNS [closed]

I have columns with a mixture of text and numbers eg

CM71846 CF21546 CM78946 CF12456 CF24566

How can I count the number of CF and number of CM please

close date 2015-10-30 17:38:28.248604

3

If you have many text variations, you can use a pivot table

2

There is a function to do it:

=COUNTIF(A1:A10;"CF.*")

Please take a look in the help about the function and the regular expressions.

@Nifty regular expressions can be disabled in the (advanced) options/settings screen. Perhaps yours is disabled? CF.* would match anything containing CF, followed by any number of characters.

1

I'm assuming that you only have one letter/number combination in each cell. Use the image above as a guide. In the example, paste this formula in cell B2:

```
=IF(LEFT(A2,2)="CF", 1, 0)
```

and this one in C2:

```
=IF(LEFT(A2,2)="CM", 1, 0)
```

Drag the cell handle of each of these cells down to fill the formulas down to the end of your data. Then sum columns B and C.

Asked: ** 2013-04-17 03:58:57 +0200 **

Seen: **24,092 times**

Last updated: **Apr 17 '13**

How do I export a chart in an image format from LibreOffice Calc? [closed]

Are there plans for a "papercut" project for libreoffice [closed]

Is it normal for Calc goal seek to take very long? [closed]

Please refine "Search" in Calc - implement functions in Gnumeric [closed]

LibreOffice Calc will not link to external data via internet [closed]

Is there a LibreOffice .odt, .ods viewer for Android? [closed]

Why is Calc so much slower at opening/saving files than MS-Office? (win7 x64) [closed]

Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.

@Nifty -- If one of the answers below works well for you, please mark it as correct.

Thanks!

Thanks great help by all