#1
|
|||
|
|||
Countif
Hello,
I am working in a spreadsheet where I want to count how many cells start with "2011". My numbering is 8 digits (e.g., 20111234 where I want to capture those starting with 2011). I have tried the following: =COUNTIF(B2:B2154,"2011*" but it returns a "0" as the result. Any thoughts? |
#2
|
||||
|
||||
Perhaps
Code:
=SUMPRODUCT(--(left(B2:B2154,4)="2011"))
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#3
|
|||
|
|||
That worked!
Thanks so much! |
#4
|
||||
|
||||
To do it with countif:
Code:
=COUNTIF(A:A,">=20110000")-COUNTIF(A:A,">=20120000") or =SUM(COUNTIF(A:A,">=201"&{1,2}&"0000")*{1,-1}) |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Countif issue | Katy I | Excel | 2 | 07-11-2012 06:30 AM |
COUNTIF and Cell address problem | ColinC | Excel | 3 | 12-24-2011 04:08 AM |
Vlookup, offset, match & countif | jujuwillis | Excel | 2 | 10-15-2011 11:06 AM |
using a cell content as a string with COUNTIF | geoffm | Excel | 1 | 08-16-2011 11:31 AM |
Countif with 2 criteria | ibrahimaa | Excel | 3 | 05-23-2011 11:23 AM |