Suppose I have a string variable containing subham$,to get the position of the dollar symbol we can use findcommand in excel ,however in VBA we have to use find like this
s = "subham$"
x = Application.WorksheetFunction.Find("$", s)
s = Application.WorksheetFunction.Find("$", Range("A1"))
s = WorksheetFunction.Find("$", Range("A1"))
s = Application.Find("$", Range("A1"))
s = InStr(s, "$")
ActiveCell.Formula = "=FIND(""$""," & """" & s & """" & ")"
Sheets("Sheet1").Range("B1") = WorksheetFunction.Find("$", s, 1)
Range("D1").FormulaR1C1 = "=FIND(""$"",""" & s & """)"
s = "subham$"
x = Application.WorksheetFunction.Find("$", s)
s = Application.WorksheetFunction.Find("$", Range("A1"))
s = WorksheetFunction.Find("$", Range("A1"))
s = Application.Find("$", Range("A1"))
s = InStr(s, "$")
ActiveCell.Formula = "=FIND(""$""," & """" & s & """" & ")"
Sheets("Sheet1").Range("B1") = WorksheetFunction.Find("$", s, 1)
Range("D1").FormulaR1C1 = "=FIND(""$"",""" & s & """)"
No comments:
Post a Comment