compare worksheets


Posted by Cindy B on January 02, 2001 11:13 AM

I have two worksheets with student info. Sheet #1 has all info on all the students. Sheet #2 has the pertinent students but only name and id#. I want to pull the students in sheet #2 from sheet #1 with all the info. How?

Posted by Aladin Akyurek on January 02, 2001 1:13 PM

Here a formula-based solution.
I'll assume that sheet1 also contains #id, name, address, phone etc where id# comes before all other info that you need to pull.
Go to sheet2, select all the cells with the pertinent data, go to the Name Box, and name this range STUDENTS.

Go to sheet2: Assuming here that A1 contains the label "id#", b1 the label "name," A2 the first id#-value, and B2 the first the name-value,
then type in c2:

=if(isna(vlookup(a1,STUDENTS,column(),0)),"",vlookup(a1,STUDENTS,column(),0)) [ copy this down as far as needed; note that id# is used as the lookup-value ]

Type the same formula in d2 and copy, in e2 and copy, etc. When ready, Copy and Paste the labels from Sheet1 into Sheet2.

Aladin

Posted by Cindy B on January 02, 2001 2:31 PM

Thank you so much for your speedy reply.
I must not be the computer geek I thought I was. I tried this and it did not return anything. I will need to use this on multiple worksheets comparing two at at time. Is there not an easier way to compare info between worksheets?

Posted by Aladin Akyurek on January 02, 2001 3:18 PM

: I have two worksheets with student info. Sheet #1 has all info on all the students. Sheet #2 has the pertinent students but only name and id#. I want to pull the students in sheet #2 from sheet #1 with all the info. How? I'll assume that sheet1 also contains #id, name, address, phone etc where id# comes before all other info that you need to pull. Go to sheet2, select all the cells with the pertinent data, go to the Name Box, and name this range STUDENTS. then type in c2:

It "did not return anything"? Well, it should work as advertised. ;-)
Sending you a workbook thru e-mail involving the machinery I described.

An easier way? The above is the easiest formula-based solution I guess.

Aladin



Posted by Cindy B on January 02, 2001 3:58 PM

:

I will check it out thank you!!