Excel VBA AVERAGEIFS range with variables -


i want put in variable in code:

sheets("sheet1").range("p1").value = _         "=averageifs(b1:b1101, b1:b1101,"">0"",b1:b1101,""<200"")" 

some thing like:

sheets("sheet1").range("p1").value = _         "=averageifs(b1:b" & mylastrow & ", b1:b1101,"">0"",b1:b1101,""<200"")" 

what correct syntax?


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -