(Solved) – excel vba – convert iferror/find formula to vba

(solved)-–-excel-vba-–-convert-iferror/find-formula-to-vba

I have the following excel formula

IFERROR(MID(B7;FIND(" ";B7) 1;1);"")

I want to convert this now to VBA, but I have trouble integrating the Find function here. This is what I have so far

IfError(Mid(Sheets("MySheet").Cells(x, 7),Sheets("MySheet").Cells(x, 7).Find " "   1, 1), "")

But that’s clearly not correct. Can somebody help me with this?

Leave a Reply

Your email address will not be published. Required fields are marked *