ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Count text (https://www.excelbanter.com/excel-discussion-misc-queries/229445-count-text.html)

Kristina

Count text
 
Hi.... I need to count the number of times each store appears (LEFT by 4
characters):
edar wkub
edar02
edar02
edar01
wkub01
wkub02
emur01

Result: Store "edar" appears 3 times; "wkub" 2 etc.

Thank you very much!!!


T. Valko

Count text
 
Try this...

=COUNTIF(A2:A7,"edar*")

=COUNTIF(A2:A7,"wkub*")

Or, using cells to hold the criteria...

B2 = edar
B3 = wkub

=COUNTIF(A2:A7,B2&"*")

=COUNTIF(A2:A7,B3&"*")

--
Biff
Microsoft Excel MVP


"Kristina" wrote in message
...
Hi.... I need to count the number of times each store appears (LEFT by 4
characters):
edar wkub
edar02
edar02
edar01
wkub01
wkub02
emur01

Result: Store "edar" appears 3 times; "wkub" 2 etc.

Thank you very much!!!




Kristina

Count text
 
Thank you so much, works perfectly!!

"T. Valko" wrote:

Try this...

=COUNTIF(A2:A7,"edar*")

=COUNTIF(A2:A7,"wkub*")

Or, using cells to hold the criteria...

B2 = edar
B3 = wkub

=COUNTIF(A2:A7,B2&"*")

=COUNTIF(A2:A7,B3&"*")

--
Biff
Microsoft Excel MVP


"Kristina" wrote in message
...
Hi.... I need to count the number of times each store appears (LEFT by 4
characters):
edar wkub
edar02
edar02
edar01
wkub01
wkub02
emur01

Result: Store "edar" appears 3 times; "wkub" 2 etc.

Thank you very much!!!





T. Valko

Count text
 
You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Kristina" wrote in message
...
Thank you so much, works perfectly!!

"T. Valko" wrote:

Try this...

=COUNTIF(A2:A7,"edar*")

=COUNTIF(A2:A7,"wkub*")

Or, using cells to hold the criteria...

B2 = edar
B3 = wkub

=COUNTIF(A2:A7,B2&"*")

=COUNTIF(A2:A7,B3&"*")

--
Biff
Microsoft Excel MVP


"Kristina" wrote in message
...
Hi.... I need to count the number of times each store appears (LEFT by
4
characters):
edar wkub
edar02
edar02
edar01
wkub01
wkub02
emur01

Result: Store "edar" appears 3 times; "wkub" 2 etc.

Thank you very much!!!








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

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