Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Jasmine Grant   on Aug 11 In MS Office Category.

  
Question Answered By: Priscilla Lewis   on Aug 11

Try this

Sub CountBirthday()
i = 1
Count = 0
With ActiveSheet
Do While .Cells(i, 1) <> "" 'assuming datas are on column 1 (A)
If Left(.Cells(i, 1), 4) < 1960 Then 'count the number of
person born before 1960
Count = count  + 1
End If
i = i + 1
Loop
.Cells(i, 1) = Count 'display result on last row of column A
End With
End Sub

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on summarize age groups Or get search suggestion and latest updates.


Tagged: