# counting data....urgent help required please!!

#### sach_k

##### New Member
i have a long list of names on an excel sheet and i am using this macro to count the number of times each inputed name occurs. the names of engineers are entered into a inputbox on a loop
how do i put the names of ALL the engineers and ALL the results (counted number if occurrences) into cells?? is there a simple macro that will read the list of names that is being by itself??

Count = 0
Target = InputBox("engineer(s) to find?")
If Target = "" Then GoTo Done
For Each Cell In Selection
N = InStr(1, Cell.Value, Target)
While N <> 0
Count = Count + 1
N = InStr(N + 1, Cell.Value, Target)

Wend
Next Cell
MsgBox Count & " Occurrences of " & Target
Done:
Loop Until Target = "end"

i really need this as soon as possible, my work cannot move forward until this is done. thanks!!!

### Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

#### Norie

##### Well-known Member
Why not just use Data>Pivot table...?

#### Kaps_mr2

##### Well-known Member
Can't you use an Advanced Filter - to get the unique names and then use
COUNTIF. So COUNTIF(A:A,"Smith") would give you the number of SMITH's in Column A.

Kaps

Replies
0
Views
142
Replies
4
Views
219
Replies
3
Views
110
Replies
2
Views
162
Replies
1
Views
158

1,191,717
Messages
5,988,259
Members
440,146
Latest member
rgomes8

### 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.

### Which adblocker are you using?

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

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