=countif ????????

Bob Morrison

New Member
Joined
Dec 11, 2009
Messages
31
<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";} </style> <![endif]--> Ok, I have say Column “A” with entries such as:

2(Sold)
5
7
1(Sold)
6
10
21

And I want to count the number of cells with (Sold) in them. The numbers prefixing the (Sold) are of no consequence for this calculation.

I thought something along the lines of =countif(A1:A10, Sold) but of course that doesn’t work. (Well doesn’t for me). The answer I’m looking for is of course 2 in the above example.

I was thinking along the lines of a “Wild Card” prefixing the Sold, say, *.(Sold) but that doesn’t work either.

[FONT=&quot]So I thought I’d check with the XL experts to see if it can be done.

Thanks :)
[/FONT]
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
I thought something along the lines of =countif(A1:A10, Sold) but of course that doesn’t work. (Well doesn’t for me). The answer I’m looking for is of course 2 in the above example.

I was thinking along the lines of a “Wild Card” prefixing the Sold, say, *.(Sold) but that doesn’t work either.
You were on the right track. The second argument to COUNTIF is a text string, so you need quote marks. As for the wildcard... put it on both sides of the word SOLD since there is text after it (the closing parenthesis)...

=COUNTIF(A1:A10,"*Sold*")

or include the closing parenthesis if you only want one wildcard...

=COUNTIF(A1:A10,"*Sold)")
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,827
Members
452,946
Latest member
JoseDavid

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