Facing Error while applying excel formula in Macro -
i have below type of values in column j in excel
<a href="http://twitter.com" rel="nofollow">twitter web client</a>
and, have used formula
=right(left(j2,len(j2)-4),len(left(j2,len(j2)-4))find(">",left(j2,len(j2)-4),2))
to value "twitter web client.
when tried apply macro using below code in not getting value. me in code applying formula in entire range of 'q' column referencing 'j' column
sub enter_formula() range("q2").formula = "=right(left(j2,len(j2)-4),len(left(j2,len(j2)-4))-find(" > ",left(j2,len(j2)-4),2))" end sub
you try this
lastrow = activesheet.usedrange.rows.count msgbox lastrow 'this give user range value used enter formulaa in rows range("q2:q" & lastrow).formula = "=left(right(rc[-7],len(rc[-7])-find("">"",rc[-7],2)),len(right(rc[-7],len(rc[-7])-find("">"",rc[-7],2)))-4)"
the result set "twitter web client" text.
Comments
Post a Comment