Saturday, December 24, 2011

Evaluate :

EVALUATE  is method in VBA which can evaluate any Function of Excel in VBA and can return the value in a variable.

To make your code faster you can use this EVALUATE trick in VBA to avoide extra looping .. it can work  till 255 cells


Like if you want to Change Case of some Text on selection you can use this command in vba.

selection=evaluate("=if(len(" & selection.address &")>0,upper(" & selection.address &")," & selection.address &")")


if you want any Calculation with cells :

selection= Evaluate( selection.address &"/1000")



No comments: