Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Excel formula to count the number of records which contains a certaintext (wildcard)

Hello,

If you want to count the number of records which contains a certain
text you can use in excel the formula
=COUNTIF(C:C;"aaa")

Which formula can I use if I want to count the number of records which
contains 'aaa' within the cells.
For example

C1= aaa
C2= bbb
C3= aaaccc
C4 = kkkaaabbb

The number of records which contain the text 'aaa' in this example is
3.
If you see I want to use something like a wildcard in a formula.

regards,
Johan.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Excel formula to count the number of records which contains a certain text (wildcard)

Hi Johan,

Am Thu, 16 Feb 2012 03:27:27 -0800 (PST) schrieb johan:

C1= aaa
C2= bbb
C3= aaaccc
C4 = kkkaaabbb


try:
=COUNTIF(C:C,"*aaa*")


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default Excel formula to count the number of records which contains acertain text (wildcard)

On Feb 16, 5:40*am, Claus Busch wrote:
Hi Johan,

Am Thu, 16 Feb 2012 03:27:27 -0800 (PST) schrieb johan:

C1= * *aaa
C2= * *bbb
C3= * *aaaccc
C4 = * kkkaaabbb


try:
=COUNTIF(C:C,"*aaa*")

Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2


This would NOT provide the desired answer. You need a looping macro
using vba FINDNEXT to find each occurence and add 1 to the count if
found.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Excel formula to count the number of records which contains acertain text (wildcard)

Thanks,

=COUNTIF(C:C;"*aaa*")
Very simple and..... it works.

regards,
Johan.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What formula should I use to count a number of records? Princesshera1 New Users to Excel 12 April 2nd 09 06:05 PM
Excel - count the number of records between two specific dates. DK Excel Worksheet Functions 4 May 21st 08 03:08 PM
Count the number of AutoFiltered records DZ Excel Worksheet Functions 6 January 17th 08 12:31 PM
Count Number of Records and Number of Fields in CSV File ExcelMonkey Excel Programming 0 November 29th 07 10:58 PM
Count the number of unique records [email protected] Excel Worksheet Functions 7 March 8th 06 07:33 AM


All times are GMT +1. The time now is 01:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"