View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
John T Ingato John T Ingato is offline
external usenet poster
 
Posts: 23
Default Count Records & Display MsgBox

MyCount = WorksheetFunction.Count("A : A")

Msgbox MyCount

or in one line

MsgBox WorksheetFunction.CountA(Range("A : A"))



"Donnie Stone" wrote in message
...
I have a unique problem I need help with. I have account numbers in

column
A, the range will vary at times. Finding the last cell automatically

would
be a big plus.

A
1 103456
2 34567
3 589123
4 103456
5 761234
6 34568
7 34567

I would like to search column A, counting the number of accounts, the

trick,
I want to exclude the 2nd, 3rd, 4th, etc., matching records and display

the
count in a MsgBox.

Based on the example above, I would like a MsgBox to display: '5 Records
were Selected'

Thanks in advance for the help.