filters + countif statements

mike.lewis

Board Regular
Joined
Nov 29, 2009
Messages
196
Hi there

i have a sheet with information on it, in one column the date could look like this

**
*73*
23**

the length of these numbers can vary

what i would like to find out in a sheet of over 30,000 entries is how many have the sequence *(numbers)* or ** or (numbers)**, i have tried through the excel 2010 advanced filter options but i dont get very far as it still contains all sorts of mixes

any ideas
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Hi there

i have a sheet with information on it, in one column the date could look like this

**
*73*
23**

the length of these numbers can vary

what i would like to find out in a sheet of over 30,000 entries is how many have the sequence *(numbers)* or ** or (numbers)**, i have tried through the excel 2010 advanced filter options but i dont get very far as it still contains all sorts of mixes

any ideas
Control+shift+enter, not just enter:
Rich (BB code):
=SUM(IF(SUBSTITUTE($A$2:$A$100,"*","")="",IF(LEN($A$2:$A$100)=2,1)))
counts the occurrences of the ** pattern that occurs stand-alone.

Rich (BB code):
=SUM(
         IF(LEN($A$1:$A$100)>2,
         IF(ISNUMBER(REPLACE(LEFT(SUBSTITUTE($A$1:$A$100,"*","#"),
                  LEN($A$1:$A$100)-1),1,1,"")+0),
         IF(LEFT($A$1:$A$100)="*",
         IF(RIGHT($A$1:$A$100)="*",1)))))

counts the occurences of the *N* pattern where N stands for a number.

Rich (BB code):
=SUM(
     IF(LEN($A$1:$A$100)>2,
     IF(ISNUMBER(LEFT(SUBSTITUTE($A$1:$A$100,"*","#"),
         LEN($A$1:$A$100)-2)+0),
     IF(RIGHT($A$1:$A$100,2)="**",1))))

counts the occurences of the N** pattern where N stands for a number.

Note that * is taken above literally.
 
Upvote 0

Forum statistics

Threads
1,224,550
Messages
6,179,459
Members
452,915
Latest member
hannnahheileen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top