Hi
1) Yep, you can use the same principle. I'd set a variable that would take the name of the workbook/sheet. Something like
now when you do your search it would be like
2) ce is a variable that takes each instance in the range as it passes through. It could be anything (fred, tom, harry, xxxxx) as it is just a variable holdall.
So what you do is nominate the range that you want to action. In this case it is done with
So as you step through each cell in that range, ce takes the instance of the cell. So you can use ce.value to get the cell value, or ce.row to get the cell row and so on. You can have the properties for that cell available using the variable.
Put a breakpoint onto the set findit line, then start the code. If you open an immediate window, then put in ?ce.address, you should see something like $V$13. Experiment with the properties of the variable in the immediate window.
rylo
Bookmarks