Hi!
I have a problem with the function .find.
Excel starts the debug when I need to find the value "minRow" inside "myRange" that is the union of two different ranges.
I don't know why, can someone help me?
thanks!
Set myRange1 = Worksheets("CAST SEGMENTS half day").Range("K2:P2")
Set myRange2 = Worksheets("CAST SEGMENTS half day").Range("R2:S2")
myRange = Application.Union(myRange1, myRange2)
minRow = Application.WorksheetFunction.Min(myRange)
Set rng = Range("myRange").find(What:=minRow, LookAt:=xlWhole, lookin:=xlValues)
num_colonna = rng.Column
I have a problem with the function .find.
Excel starts the debug when I need to find the value "minRow" inside "myRange" that is the union of two different ranges.
I don't know why, can someone help me?
thanks!
Set myRange1 = Worksheets("CAST SEGMENTS half day").Range("K2:P2")
Set myRange2 = Worksheets("CAST SEGMENTS half day").Range("R2:S2")
myRange = Application.Union(myRange1, myRange2)
minRow = Application.WorksheetFunction.Min(myRange)
Set rng = Range("myRange").find(What:=minRow, LookAt:=xlWhole, lookin:=xlValues)
num_colonna = rng.Column