In the spreadsheet I posted, the columns "A", "B" and "C" in the Actual spreadsheet that I need to use this VBA in the columns are as followed.
Column "A" is really Column "C" in the Actual spreadsheet
Column "B is really Column "F" in the Actual spreadsheet
Column "C" is really Column "M" in the Actual spreadsheet
Is this still possible? The spreadsheet was created by someone else and have been instructed to not move the columns around because other macros will be used also.
How can I buy you a Coffee or a Beer?
I tried changing the code to the following and it gave me an error.
Sub Ratings()
Dim dic As Object
Dim a As Variant, b As Variant, n As Variant
Dim i As Long
a = Range("C8", Range("M" & Rows.Count).End(3)).Value
ReDim b(1 To UBound(a, 1), 1 To 1)
Set dic = CreateObject("Scripting.Dictionary")
For i = 1 To UBound(a)
n = Application.Match(a(i, 3), Array("U", "M", "S"), 0)
If Not IsError
Then
If Not dic.Exists(a(i, 1)) Then
dic(a(i, 1)) = n & "|" & a(i, 3)
Else
If n < Val(Split(dic(a(i, 1)), "|")(0)) Then
dic(a(i, 1)) = n & "|" & a(i, 3)
End If
End If
End If
Next
For i = 1 To UBound(a)
b(i, 1) = Split(dic(a(i, 1)), "|")(1)
Next
Range("F8").Resize(UBound(b)).Value = b
End Sub