Hi, I am fairly new to excel and I'm writing a macro that uses the Find Function. The "searchstr" is a varaibale that is both number and letters
For example:
DIM searchstr as String
searchstr = "x234va"
ActiveCell.FormulaR1C1 = "=FIND(" & searchstr & ",W2)"
When the variable is both letter and number, the code prints
=Find( 'x234va' ,W2)
the extra ' ' causes the Find function to not work correctly. Is there a way to avoid this?
Bookmarks