Compare two columns and copy data if values are the same.

A

Akhorahil

I've tried figuring this out with formulas but I think I need a vb
solution.
I've got a column with values in column A in sheet 1 and I've got
column of values in column G of sheet 2. Every value in column G sheet
is one of the values from column A sheet 1. What I need is somethin
that will compare G to the whole column of A and then copy the valu
from cell B from sheet 1 to Column H in sheet 2.
Example:

Sheet 1 Sheet 2
A B G H
1 1 1
2 8 1
3 4 2
4 6 4
5 3 4
4
5

Would become

Sheet 2
G H
1 1
1 1
2 8
4 6
4 6
4 6
5 3

Any help would be appreciated
 
A

Akhorahil

Ok the advertisement messed up the layout.
Sheet 1 Sheet 2
A B G H
1 1 1
2 8 1
3 4 2
4 6 4
5 3 5
Would become
Sheet 2
G H
1 1
1 1
2 8
4 6
5 3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top