COUNTIF not counting

ProblemFinder

New Member
Joined
Aug 22, 2011
Messages
10
I am running Excel 03 on XP SP3.
So, I am trying to count the number of cells that begin with a "7" in a certain column. The data I'm looking for includes "701", "702"..."709", "70A" and "70L". I am using =COUNTIF(D3:D65535,"=7*"), but the function only seems to be counting "70A" and "70L" cells. In case it helps, the data for the last two types is automatically aligned to the left while the rest is aligned to the right.
I am pretty sure the problem has something to do with the fact that the last two are strings and the rest are numbers, but I'm not sure how to work around it. Any help is always appreciated.
Thanks.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
I am running Excel 03 on XP SP3.
So, I am trying to count the number of cells that begin with a "7" in a certain column. The data I'm looking for includes "701", "702"..."709", "70A" and "70L". I am using =COUNTIF(D3:D65535,"=7*"), but the function only seems to be counting "70A" and "70L" cells. In case it helps, the data for the last two types is automatically aligned to the left while the rest is aligned to the right.
I am pretty sure the problem has something to do with the fact that the last two are strings and the rest are numbers, but I'm not sure how to work around it. Any help is always appreciated.
Thanks.

The wildcard * does not apply to true numbers. Try the following instead:

=SUMPRODUCT((LEFT(D3:D65535,1)="7")+0)
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,866
Members
452,948
Latest member
UsmanAli786

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