Excel VBA - Search Two Different Cells For A Match
I am working on a VBA app that picks certain pieces of information from a whole bunch of other spreadsheets and creates what is essentially a summary page. In addition to what it gathers, there are columns on the spreadsheets for other things (like dates) that is manually entered by the user.
Each of the spreadsheets that it gathers information from can have numerous versions housed in separate spreadsheet files. An example of the naming convention is:
hack06302009O.xls - the O = Originial
hack063020091R.xls - the 1R = first revision
hack063020092R.xls = the 2R = second revision
so on and so forth
The filename itself gets parsed with the first part being hack06302009 and the second part being the revision number, i.e., O, 1R, 2R, etc
Both are saved in separate columns on the summary sheet.
What I need to do prior to making a new entry is search the existing summary sheet to see if the file being loaded already exists on the sheet. In other words, if the user selects hack063020091R.xls to load, I need to search column B to see if hack06302009 exists and column F to see if 1R exists. If both are true, then I simply display the summary sheet and make no new entry. If either is False, I make a new entry.
This all works at the moment, but in order to get it to work I'm doing two separate searchs. I set the range to B:B then do a Cells.Find(what:='hack06302009') then set the range to F:F and do a Cells.Find(what:='1R')
Here is my question: Is there a better, more efficient, way of doing a search on two different cells?