I have a column TEXT9 which has values L, D, H, S, or T. I want a routine that will go through all of the valid tasks and give me a total of each. The routine I have doesn't work, but I hope I'm on the right track. Anyone know how to do something like this? The step in the For Each doesn't appear to be talking the proper terminology. Also, how do I set it to start at row 1?
Thanks, Jim
Dim TaskType(5) As Integer
For i = 0 To 5
TaskType(i) = 0
Next i
For Each A In ActiveCell.Task.Text9
Select Case ActiveCell.Task.Text5
Case "D"
TaskType(1) = TaskType(1) + 1
Case "H"
TaskType(2) = TaskType(2) + 1
Case "L"
TaskType(3) = TaskType(3) + 1
Case "S"
TaskType(4) = TaskType(4) + 1
Case "T"
TaskType(5) = TaskType(5) + 1
Case Else
TaskType(0) = TaskType(0) + 1
End Select
Next
Thanks, Jim
Dim TaskType(5) As Integer
For i = 0 To 5
TaskType(i) = 0
Next i
For Each A In ActiveCell.Task.Text9
Select Case ActiveCell.Task.Text5
Case "D"
TaskType(1) = TaskType(1) + 1
Case "H"
TaskType(2) = TaskType(2) + 1
Case "L"
TaskType(3) = TaskType(3) + 1
Case "S"
TaskType(4) = TaskType(4) + 1
Case "T"
TaskType(5) = TaskType(5) + 1
Case Else
TaskType(0) = TaskType(0) + 1
End Select
Next