PDA

View Full Version : [SOLVED] Can't Get Find Method to Work



JBSMichael
02-03-2015, 04:43 AM
Hi all,

I have a suspicion I'm about to be found out for the idiot I surely am, but, here goes. Can anyone see what is wrong with the statement below? It lies within a For...Next loop for lngReqtRow and is attempting to cycle though the instances of lngReqtRow and on each step to run a search for a match in (a defined) rngSearchRange which lies in another file (the search file is open by the time this line runs). On running, I get Error 2023 associated with the 'wsReqts.Cells(lngReqtRow,2)' part. All variables are defined properly. I'm afraid I can't post the entire workbook but can provide more of the code if that's useful to anyone.



Set rngMatch = rngSearchRange.Find(what:=wsReqts.Cells(lngReqtRow, 2), LookIn:=xlValues, LookAt:=xlWhole)



Any help would be really welcome! TIA

JBSMichael
02-03-2015, 04:55 AM
Sorry, sorry. I have found myself out. The cell being matched had a #REF error in it. Ignore me.