Restrict next record to a specific column for a named range
Posted on 2014-03-09
If have a named range and want to loop thru a specific column of the named range is this possible. Note my defuned name range spans from A1:C300. I want to loop thru Column A and if it matches then take a value found in the same row from column B. Am I just better off not trying to leverage off my Defined Name and instead set the range (Col A) from within the code ?
Dim MyRng as Range
For each MyRng in Range("Produce")
If "Orange" = MyRng THEN
msgBox = MyRng.Offset(0,1)