I have an excel table with multiple columns, I need to add value for every transaction_id, how can i compare column C with column J and enter values from K into D column?
Table looks like this:
C | D | J | K |
---|---|---|---|
transaction_id | amount | transaction_id | amount |
1 | 5 | 1000 | |
2 | 1 | 1000 | |
5 | 118 | 200 | |
118 | 117 | 500 |
I need to match the exact transaction_id and move from the right to left amount value if transaction id is the same, how can I do that?
CodePudding user response:
Just use VLOOKUP:
Formula in D is:
=VLOOKUP(C2,$J$2:$K$5,2,FALSE)