Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default matching two columns and adding info

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

--
newyorkjoy
thanks for the help!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default matching two columns and adding info

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

"newyorkjoy" wrote:

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

--
newyorkjoy
thanks for the help!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 191
Default matching two columns and adding info

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.
--
Boris


"newyorkjoy" wrote:

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

--
newyorkjoy
thanks for the help!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default matching two columns and adding info

it is still not working what can I do?
--
newyorkjoy
thanks for the help!


"BorisS" wrote:

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.
--
Boris


"newyorkjoy" wrote:

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

--
newyorkjoy
thanks for the help!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default matching two columns and adding info

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

On Feb 22, 4:44 am, newyorkjoy
wrote:
it is still not working what can I do?
--
newyorkjoy
thanks for the help!



"BorisS" wrote:
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.
--
Boris


"newyorkjoy" wrote:


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


--
newyorkjoy
thanks for the help!- Hide quoted text -


- Show quoted text -



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I copy info while matching labels? cmccurdy23 Excel Worksheet Functions 0 January 30th 07 03:49 PM
Adding data to matching records... OcellNuri Excel Worksheet Functions 7 June 27th 06 09:26 PM
Newbie question: Matching data/2 wkshts copying info over dperry11273 Excel Worksheet Functions 2 July 26th 05 07:39 AM
Adding info in the row at the bottom using macro? Carrie Excel Discussion (Misc queries) 1 April 14th 05 05:18 PM
Adding info onto a "permanent" form Howeey Excel Worksheet Functions 1 December 25th 04 09:12 PM


All times are GMT +1. The time now is 11:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"