I'm trying to run code on a range that changes through different iterations of a loop. Here is what I would like the code to run if the value in range("SearchBy") = ZeroCounts
Dim WorkRange As range
Set WorkRange = range("ZeroCounts")
Here is how I am attempting to solve this but I can't find a way that works without returning errors. Any ideas?
Dim dummy As String
dummy = """" & range("SearchBy").Value & """"
Dim WorkRange As range
WorkRange = Sheets("HungarianAlgorithm").range(dummy)
WorkRange.Select