kelseyvdh
09-25-2018, 05:44 AM
Hi everyone, I'm struggling to solve VBA macro. I've attached an example to explain what I want.
In the example there're two sheets with two lists. I want to get the value of column A in Sheet 1 and look it up Sheet 2. Then I want to copy the value of column B in Sheet 2 to column B in Sheet 1. It has to be the value in the same row.
So,
Sheets("Sheet1").Range("B2") should be "3"
Sheets("Sheet1").Range("B3") should be "4"
Sheets("Sheet1").Range("B4") should be "1"
Sheets("Sheet1").Range("B5") should be "2"
Sheets("Sheet1").Range("B6") should be "2"
Can you guys help me with that? Many thanks in advance!
In the example there're two sheets with two lists. I want to get the value of column A in Sheet 1 and look it up Sheet 2. Then I want to copy the value of column B in Sheet 2 to column B in Sheet 1. It has to be the value in the same row.
So,
Sheets("Sheet1").Range("B2") should be "3"
Sheets("Sheet1").Range("B3") should be "4"
Sheets("Sheet1").Range("B4") should be "1"
Sheets("Sheet1").Range("B5") should be "2"
Sheets("Sheet1").Range("B6") should be "2"
Can you guys help me with that? Many thanks in advance!