I'm trying to get the below to work, I'm tired and can't really tell if it should work or i've missed something simple :P


=COUNTIF(codejan07,MID(codejan07,12,1)="P")

So what I have is 10000 rows of data and one column (codejan07) has a 20 digit code. I need to count how many of those 10000 lines has the letter P in position 12 of the code. I know I can do this by adding another column but I would like to have it all in one cell..

Any ideas, can it be done or do I have to resort to plan "B"

Cheers