I am new to the group. Thanks to be a member. This is my problem I want to count each needed cell value at the end of the row. Here is the image I have attached.
In the image, the colored columns are the "counter" has to be applied. My boss wants 10 people who have more "E"s and "V"s, ("E" for Excellent & "V" for Very good. Then someone helped me. This is the code I've tried.
Sub Count_Excellents()
Dim ws As Worksheet
Dim rng As Range
Dim outputE As Range, outputV As Range
Set ws = Worksheets("Sheet1")
Set rng = ws.Range("B2:N2") 'this must be upto the end of the data range
Set outputE = ws.Range("B2").End(xlToRight).Offset(0, 1)
Set outputV = ws.Range("B2").End(xlToRight).Offset(0, 2)
outputE = Application.WorksheetFunction.CountIf(rng, "E")' for excellent
outputV = Application.WorksheetFunction.CountIf(rng, "V") 'for verygood
End Sub
Is there any one helped me by making this loop. Or any other method
Sub Count_Excellents()
Dim ws As Worksheet
Dim rng As Range
Dim outputE As Range, outputV As Range
Set ws = Worksheets("Sheet1")
Set rng = ws.Range("B2:N2") 'this must be upto the end of the data range
Set outputE = ws.Range("B2").End(xlToRight).Offset(0, 1)
Set outputV = ws.Range("B2").End(xlToRight).Offset(0, 2)
outputE = Application.WorksheetFunction.CountIf(rng, "E")' for excellent
outputV = Application.WorksheetFunction.CountIf(rng, "V") 'for verygood
End Sub
Is there any one helped me by making this loop. Or any other method