Or if you no longer need the formula
'Range("B1").Formula = "=COUNTIF(n:n,""*john*"")"
Range("b1").Value = Application.CountIf(Columns("n"), "*john*")
--
Don Guillett
SalesAid Software
(E-Mail Removed)
"CLR" <(E-Mail Removed)> wrote in message
news:2F525567-459D-465E-A9A9-(E-Mail Removed)...
> Cool, thanks JE..........just tweaked it a bit for my application...
>
> Sub FindName()
> Range("B1").Formula = "=COUNTIF(n:n,""*john*"")"
> End Sub
>
> Many thanks..........
> Vaya con Dios,
> Chuck, CABGx3
>
>
> "JE McGimpsey" wrote:
>
>> One way:
>>
>> =COUNTIF(A:A,"*JOHN*")
>>
>> In article <785D4010-A78E-4D39-933C-(E-Mail Removed)>,
>> CLR <(E-Mail Removed)> wrote:
>>
>> > Hi All.......
>> > How might the code read to perform a check of all cells in the selected
>> > column and count all the cells which contain a certain string at least
>> > once,
>> > and place the total in cell B1. That is, if the string exists by
>> > itself, or
>> > within a string of other characters in the same cell.....and if
>> > multiple
>> > times in one cell, only count once.
>> >
>> > If looking for JOHN,
>> > Cell with JOHN ...would count 1
>> > Cell with JOHN/BILL /TOM & OTHERS... would count 1
>> > Cell with JOHN / BILL,JOHN ...would count 1
>> > Cell with BILL, TOM ...would not count
>> > (note the inconsistant punctuation)
>> >
>> > TIA for any help
>> > Vaya con Dios,
>> > Chuck, CABGx3
>>