I currently running a case select depending on the value of a cell to set different cells to “NA” (its a data entry sheet) , depending on this string I have currently like 35 options to check for the case select, and it’s too slow, taking like 5 minutes to search
the code goes like this
Dim rng As Range
Dim cell As Range
Dim rw As Long
' See if any cells updated in column G)
Set rng = Intersect(Target, Range("H:H"))
If rng Is Nothing Then Exit Sub
See if any cells updated in column G)
Set rng = Intersect(Target, Range("H:H"))
If rng Is Nothing Then Exit Sub
Application.EnableEvents = False
' Loop through updated cells in columns H
'For Each cell In rng
For Each cell In Range("I:I")
rw = cell.Row
Select Case cell.Value
Case "LocalElaboração_DossiêCancelamento de Registro"
Cells(rw, "O") = "NA"
Cells(rw, "R") = "NA"
Cells(rw, "S") = "NA"
Cells(rw, "U") = "NA"
Cells(rw, "V") = "NA"
Cells(rw, "W") = "NA"
Cells(rw, "X") = "NA"
Cells(rw, "Y") = "NA"
Cells(rw, "Z") = "NA"
Cells(rw, "AA") = "NA"
Cells(rw, "AB") = "NA"
Cells(rw, "AD") = "NA"
Cells(rw, "AL") = "NA"
Cells(rw, "AM") = "NA"
Cells(rw, "AN") = "NA"
Cells(rw, "AP") = "NA"
Cells(rw, "AQ") = "NA"
Cells(rw, "AR") = "NA"
Cells(rw, "AT") = "NA"
Cells(rw, "AU") = "NA"
I have currently 35 variables but the sheet is too slow. Can someone help me out?. thx!!
My objective is to search for this combinations depending on the dropdown cell and type NA where applicable
Jorge Garcia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.