matching two columns and adding info

G

Guest

I wrote this question earlier, but I was not clear about what I needed. I
have two worksheets. Sheet 1 has a column with ALL the dates from 1900 until
the present. Sheet 2 has a column A with SOME of the dates and column B with
data to match those dates. I need excel to find the dates in sheet1 that
match the dates in sheet2, and then to put the data that is in sheet 2 into
sheet 1.

Worksheet 1 Worksheet 2
column A Column A Column B
1/1/1900 1/2/1990 -1
1/2/1900 1/3/1990 1
1/3/1900 1/4/1990 3

I will need worksheet 1 to have a column B that will show the information in
column B of worksheet 2 matching the correct dates.

I appreciate all your help. Thanks
 
G

Guest

in column B of sheet1:

=IF(ISNA(VLOOKUP(A1,Sheet2!A:B,2,0)),"",VLOOKUP(A1,Sheet2!A:B,2,0))

and copy down

HTH
 
G

Guest

in column B of sheet 1 (assume B1 as the first cell), enter the following
formula:

=vlookup(a1,range,2,false)

where range is the two column range (or just the relevant cells, not
necessarily the full columns) where you have sheet 2 data. The second column
of the two has to be the information you want pasted, or you can change the
"2" in the formula to be whatever column number the data appears in, counting
from left to right, starting with the first column. The left column of the
range has to be the dates of sheet 2. In other words, the dates that are
being matched against.
 
P

Pete_UK

I left an answer at your other post last night - check that out for
some things to try.

The other thing that might be happening is that your dates are not
real dates in one of the sheets, but text values that look like dates.
For VLOOKUP to work you must have values that match exactly.

Hope this helps.

Pete
 

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