excel vba - How to freeze a range in VBA Custom function? -


i want use udf function in excel freeze range when user drag formula. code here:

public function division(rng1 range, rng2 range, rng3 range) division = application.worksheetfunction.sum(rng1) / application.worksheetfunction.sum(rng2) * rng3 end function 

i want lock rng1 , rng2 in vba, not in excel sheet dollar sign. how can lock range.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -