ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel VBA UDF Userdefined function - search in partially empty fie (https://www.excelbanter.com/excel-programming/378851-excel-vba-udf-userdefined-function-search-partially-empty-fie.html)

Eckhard

Excel VBA UDF Userdefined function - search in partially empty fie
 
Hi,
I wrote a function that tries to find a text in a a range of 5 cells.
If they are all poplated it works fine.
If one of them is empty the .find command doesn't work anymore.

What can I do?
The line in my function is:
Set Reslt = Sheets("Data").Range("C5:G5").Find(s, LookAt:=xlPart)

Thanks,
Eckhard
P.S. Bob, thanks for your reply to my other post. It works perfectly. Can
you help again?



All times are GMT +1. The time now is 06:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com