vba - Vlookup help needed - Can't seem to find this answer elsewhere -


i'm trying lookup id column i, in column a. code i'm using:

dim x long

lr = worksheets("risk explorer greeks").cells(rows.count, "i").end(xlup).row

range("j2:j2" & lr).formular1c1 = "=vlookup(rc[-1], r1c1:r50000c1, 1, false)"

i have ~40,000 values in column j, when run code ends populating way down cell 237,000 - how can amend code looks column j has value, , doesnt lookup loads of blank cells?

alternatively if there faster way lookup rather above formula, pls suggest - i'd grateful help!

you're appending number 37000 string "j2:j2", gives "j2:j237000".

replace range("j2:j2" & lr) range("j2:j" & lr). should go.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -