Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populate Excel column with occurrence number 1

Status
Not open for further replies.

NJko4

MIS
Mar 8, 2008
13
US
Have the following in an Excel 2003 spreadsheet:

MbrID---VisitDate---VisitNumber
2684----1/4/07
2684----1/6/07
2684----1/10/07
4873----2/1/07
4873----2/5/07
4873----2/15/07

Is there any method available where the column titled "VisitNumber" can be populated with the number of the visit? For example, For MbrID 2684, the VisitNumber should be 1,2,and 3 for the VisitDates 1/4/07, 1/6/07, and 1/10/07, respectively.

Any insight is appreciated.
 
Assuming that the first MbrID is in A2, and VisitNumber is Column C, put this in C2:


=COUNTIF($A$2:A2,A2)

Copy it down.

Lilliabeth
-Why use a big word when a diminutive one will do?-
 
Wow!

That was quick response!

Thank you, I will try the suggestion.
 
Well,

it didn't work - There are 1s populating each row in the column.
 
Spoke too soon!

It appears that the formula is working.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top