简体   繁体   中英

Count spesific number in a string of number in excel

I have an ID with the format is : xxxxxxxx ( 8 numbers). Example : 16515134

3 first numbers is faculty code (In the example : 165) 2 numbers after that is year you enter the university (In the example : 15) 3 last numbers is personal number (In the example : 134)

I have about 100 hundred IDs in 100 rows in one cell.

I want to count the specific 4th and 5th number position (year you enter the university).

Example :

16515134

16515145

13216124

I want to count the "15" (the 4th dan 5th number). So it will give 2 as the answer.

So how to do that ? I'm already tried use =COUNTIFS(A1:A6,"***15*") but it only works when it is a text not a number.

Something like:

=SUMPRODUCT(--(MID(A1:A20,4,2)="15"))

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM