hi all i ahve a table with ranks in colum "e", each row has will have a number one in either column "h" through to "L"
i am trying to look at colum "e" count the rank that the number one in any of the columns "h-l" and summarise the data on sheet "summary"
i can not fo the life of me figure out the "C=MATCH or IF ARRSUM" part of the below code.
if anyone has any advice it would be appreciated.
Dim total(20, 4) As String
Dim row As Integer, c As Integer
total(1, 0) = "PTE"
total(2, 0) = "CFN"
total(3, 0) = "SPR"
toatl(4, 0) = "LCPL"
toatl(5, 0) = "LCPL"
toatl(6, 0) = "LBDR"
toatl(7, 0) = "CPL"
toatl(8, 0) = "BDR"
toatl(9, 0) = "SGT"
toatl(10, 0) = "WO2"
toatl(11, 0) = "WO1"
toatl(12, 0) = "LT"
toatl(13, 0) = "CAPT"
toatl(14, 0) = "MAJ"
toatl(15, 0) = "LTCOL"
For row = 1 To Range("e65000").End(xlUp).row
c = match (1,"c"& row&"L" & row)
Select Case Cells("e" & row)
Case "PTE", "CFN", "SPR"
total(1, c) = toatal(1, c) + 1
Case "LCPL", "LBDR"
total(2, c) = toatal(2, c) + 1
Case "BDR", "CPL"
total(3, c) = toatal(3, c) + 1
Case "SGT"
total(4, c) = toatal(4, c) + 1
Case "WO2"
total(5, c) = toatal(5, c) + 1
Case "WO1"
total(6, c) = toatal(6, c) + 1
Case "LT"
total(7, c) = toatal(7, c) + 1
Case "CAPT"
total(8, c) = toatal(8, c) + 1
Case "MAJ"
total(9, c) = toatal(9, c) + 1
Case "LTCOL"
total(10, c) = toatal(10, c) + 1
End Select
Next row
row = 40
For Rank = 1 To 20
IF ARRSUM (TOTAL(RANK))>0
Sheets("summary").Cells(ro, 1) = toatl(Rank, 0)
for svc = 1-4
Sheets
("summary").cells(row,svc+1)=total(rank,svc)
Next svc
End If
i am trying to look at colum "e" count the rank that the number one in any of the columns "h-l" and summarise the data on sheet "summary"
i can not fo the life of me figure out the "C=MATCH or IF ARRSUM" part of the below code.
if anyone has any advice it would be appreciated.
Dim total(20, 4) As String
Dim row As Integer, c As Integer
total(1, 0) = "PTE"
total(2, 0) = "CFN"
total(3, 0) = "SPR"
toatl(4, 0) = "LCPL"
toatl(5, 0) = "LCPL"
toatl(6, 0) = "LBDR"
toatl(7, 0) = "CPL"
toatl(8, 0) = "BDR"
toatl(9, 0) = "SGT"
toatl(10, 0) = "WO2"
toatl(11, 0) = "WO1"
toatl(12, 0) = "LT"
toatl(13, 0) = "CAPT"
toatl(14, 0) = "MAJ"
toatl(15, 0) = "LTCOL"
For row = 1 To Range("e65000").End(xlUp).row
c = match (1,"c"& row&"L" & row)
Select Case Cells("e" & row)
Case "PTE", "CFN", "SPR"
total(1, c) = toatal(1, c) + 1
Case "LCPL", "LBDR"
total(2, c) = toatal(2, c) + 1
Case "BDR", "CPL"
total(3, c) = toatal(3, c) + 1
Case "SGT"
total(4, c) = toatal(4, c) + 1
Case "WO2"
total(5, c) = toatal(5, c) + 1
Case "WO1"
total(6, c) = toatal(6, c) + 1
Case "LT"
total(7, c) = toatal(7, c) + 1
Case "CAPT"
total(8, c) = toatal(8, c) + 1
Case "MAJ"
total(9, c) = toatal(9, c) + 1
Case "LTCOL"
total(10, c) = toatal(10, c) + 1
End Select
Next row
row = 40
For Rank = 1 To 20
IF ARRSUM (TOTAL(RANK))>0
Sheets("summary").Cells(ro, 1) = toatl(Rank, 0)
for svc = 1-4
Sheets
("summary").cells(row,svc+1)=total(rank,svc)
Next svc
End If