Sub btnPercent()
Dim r As Integer, c As Integer
r = 5
c = 47
Dim hand1 As Range, hand2 As Range, hand3 As Range, hand4 As Range
Dim flop1 As Range, flop2 As Range, flop3 As Range, turn As Range, river As Range
Set hand1 = Range("B2")
Set hand2 = Range("D2")
Set hand3 = Range("F2")
Set hand4 = Range("H2")
Set flop1 = Range("L2")
Set flop2 = Range("N2")
Set flop3 = Range("P2")
Set turn = Range("R2")
Set river = Range("T2")
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
With Sheets("compiler")
Do While .Cells(r, c) <> vbNullString
Select Case Mid(.Cells(r, c), 1, 2)
Case Is = hand1, hand2, hand3, hand4, flop1, flop2, flop3, turn, river
.Cells(r, c + 1) = vbNullString
Case Else
Select Case Mid(.Cells(r, c), 3, 2)
Case Is = hand1, hand2, hand3, hand4, flop1, flop2, flop3, turn, river
.Cells(r, c + 1) = vbNullString
Case Else
Select Case Mid(.Cells(r, c), 5, 2)
Case Is = hand1, hand2, hand3, hand4, flop1, flop2, flop3, turn, river
.Cells(r, c + 1) = vbNullString
Case Else
Select Case Mid(.Cells(r, c), 7, 2)
Case Is = hand1, hand2, hand3, hand4, flop1, flop2, flop3, turn, river
.Cells(r, c + 1) = vbNullString
Case Else
.Cells(r, c + 1) = "+"
End Select
End Select
End Select
End Select
c = c + 3
Select Case .Cells(r, c)
Case vbNullString
c = 47
r = r + 1
End Select
Loop
End With
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
It takes about a minute to finish the macro loop.
Bookmarks