Hi all,
I'm trying to return a row number of a specific string value, based off of the results of a range.find formula. I don't understand why, but the function is returning an integer and not a long data type. I have triple checked my variables, and "filelastrow" as well as "UCRMainLastRow" are both of type long. I understand that .Row is supposed to return a long also.
I attempted to wrap the function with CLng(), but I am still getting an int and type mismatch.
Any help is appreciated!
I'm trying to return a row number of a specific string value, based off of the results of a range.find formula. I don't understand why, but the function is returning an integer and not a long data type. I have triple checked my variables, and "filelastrow" as well as "UCRMainLastRow" are both of type long. I understand that .Row is supposed to return a long also.
I attempted to wrap the function with CLng(), but I am still getting an int and type mismatch.
Any help is appreciated!
Code:
filelastrow = macroSh5.Range("A2:A" & UCRMainLastRow).Find(What:=strPlanNumberWholeCell, After:=ActiveCell, LookIn:=xlValues, LookAt _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:= _
False, SearchFormat:=False).Row