excel - For loops with sheet range in declaration -


so making loop fill values in cells on sheet1. upperbound row number on sheet2, , figured slower saving row number variable. in case isn't entirely clear, i'm saying intuition told me

for = 1 sheet2.range("a1048576").end(xlup).row 

would slower than

for = 1 lastrow 

since loop have keep referencing sheet2. remembered every time debug loop , put breakpoint @ declaration* statement, never stop @ line. figured they'd @ least same amount of time since maybe both temporarily saved. made quick test before asking , surprise, sheet-referencing loop faster other.

does know why be?

*what line called? declaration of loop? conditional statement?


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -