Using FIND function-VBA in Excel

March 17, 2009 at 04:08:51
Specs: Windows XP

I am using Office 2007.

I am trying to use the FIND function in VBA, Excel, to find a numeric value and return its row number.

The value surely exists and when I use the FIND button in the sheet the same numeric value is found, however only when I use the FIND function in VBA to find the numeric value in the same sheet run-time error '91' is returned.

Please help!


See More: Using FIND function-VBA in Excel

Report •

March 17, 2009 at 07:42:32
It would help us solve your issue if you posted the snippet of code that produces the error. Since we know that the Find function is available in VBA and therefore should find your data, we can't tell you why you're getting an error unless you tell us what you are doing.

That said, have you looked up the Find function in VBA help?

I use Find quite often and many times I just copy the example from the Help file and then modify it to suit my needs.

Report •

March 19, 2009 at 21:35:19
Thank you for your help.

I just solved the problem.

It was a difference in the formatting of the Find What: value, and the range which the Find Function referred to.


Report •

Related Solutions

Ask Question