The below formula is working. But I need to pass var1 variable instead of string which is A in the formula.
Can someone pls guide how can I use a variable in vba?
Should I use it with & ?
var1 = Worksheets("Macro").Range("F10").Value
ActiveCell.FormulaR1C1 = _ "==IF(ISNUMBER(SEARCH("A",A2)),"A1","B")"
AM getting error if i try with
ActiveCell.FormulaR1C1 = _ "==IF(ISNUMBER(SEARCH(var1,A2)),"A1","B")"