Hello!
I would like to know if it's possible to use VLOOKUP formula by Field Calculator.
I need to fill some informations according to data in attribule table. To exemplify, i'm using this table below.
column A | column B | column C | column D | |
COTM | OTTOM | COTJ | OTTOJ | |
row 3 | AD2 | 88ab | AD2 | |
row 4 | DF3 | 87ab | AD2 | |
row 5 | TR5 | 86ab | TR5 | |
row 6 | GH4 | 85ab | FS2 | |
row 7 | FS2 | 84ab | TR5 |
If were to do the calculation by Excel, the operation would be simple, like: D3 = VLOOKUP (C3;A:B;2;FALSE)
How would be VBAcript for VLOOKUP function by Field Calculator?If someone know how to help me, I appreciate.
Gabriela
Does it have to be in the Field Calculator? If not you could summarize the table based on field COTM and taking the first of field OTTOM, then join the output table to this table on the field COTJ and fill field OTTOJ with the values from the joined field OTTOM.
Indeed. It's a great solution.
I had thought to use VLOOKUP function 'cause in fact I have to do this process more than once and with different variables in the same atttibutes table, but I can do that with summarize... perhaps it's take more time, but it's possible.
Thank you!
If you have to do it multiple times, you could consider using some python code (to do this automatically). If you need some help with it, let me know.