Help with FIND in VBA

Copper Contributor

Hello, I am trying to create a macro in VBA, that can find a certain word within a range (row 4), then do actions based on the result. The resulting actions I have working, but I can't get them to be driven by the initial search.

 

I tried to use a FIND function to search for "WK4", however, it's not able to find it because it's in amongst other text, i.e "Sepetember WK4". I need it to be able to find if there is any "WK4" in row 4 of my sheet, among other text as mentioned. Is there a way to do this? Thanks

2 Replies

@TP700 

In Find you can specify LookAt as xlPart. This should return the intended result if i correctly understand the question.

Range.Find method (Excel) | Microsoft Learn

Thank you for your response, I will try that