#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default Excel formula

I need to create a formula that will compare the contents of cells
A2:A2000, to the contents of cells A2:A2000 in another worksheet
('schools'), and when finding 2 values that match, I need to bring the
contents of the corresponding cell in column B from 'schools' into the
first worksheet.

How do I go about setting this up?

KLR

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JE McGimpsey
 
Posts: n/a
Default Excel formula

One way:

B2: =IF(A2=Schools!A2,Schools!B2,"")

copy down to B2000.

OTOH, if you want to sum all the Schools!B2:B2000 where
A2:A2000=Schools!A2:A2000 in one cell:

=SUMPRODUCT(--(A2:A2000='Schools'!A2:A2000), Schools!B2:B2000)

or, if you want to exclude blanks:

=SUMPRODUCT(--(A2:A2000=Schools!A2:A2000), --(A2:A2000<""),
Schools!B2:B2000)


For an explanation of --, see

http://www.mcgimpsey.com/excel/doubleneg.html
In article . com,
wrote:

I need to create a formula that will compare the contents of cells
A2:A2000, to the contents of cells A2:A2000 in another worksheet
('schools'), and when finding 2 values that match, I need to bring the
contents of the corresponding cell in column B from 'schools' into the
first worksheet.

How do I go about setting this up?

KLR

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bpeltzer
 
Posts: n/a
Default Excel formula

I think you just need a vlookup; in cell b2 on the sheet you need to
supplement:
=if(isna(vlookup(a2,schools!A:B,2,false)),"",vlook up(a2,schools!A:B,2,false))
This will return the contents of column B from the row in which in finds the
matching entry. If there is no match, the result is blank.

" wrote:

I need to create a formula that will compare the contents of cells
A2:A2000, to the contents of cells A2:A2000 in another worksheet
('schools'), and when finding 2 values that match, I need to bring the
contents of the corresponding cell in column B from 'schools' into the
first worksheet.

How do I go about setting this up?

KLR


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ashish Mathur
 
Posts: n/a
Default Excel formula

Hi Roberts,

How are you. I would suggest that you use the index command instead of the
vlookup command because in the vlookup command you run the risk of getting
values for approximate matches. In the index function, you can find exact
matches by specifying 0 in the last syntax of the function. more help is
available inthe Help menu

Regards

" wrote:

I need to create a formula that will compare the contents of cells
A2:A2000, to the contents of cells A2:A2000 in another worksheet
('schools'), and when finding 2 values that match, I need to bring the
contents of the corresponding cell in column B from 'schools' into the
first worksheet.

How do I go about setting this up?

KLR


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default Excel formula

Not true, vlookup with either FALSE or 0 will look for exact matches,
index by itself doesn't lookup anything, I assume you meant a combination of
index and match where match will have the option for exact match
Only reason to use that in case of an exact match is if the lookup value is
not in the leftmost column


--

Regards,

Peo Sjoblom

"Ashish Mathur" wrote in message
...
Hi Roberts,

How are you. I would suggest that you use the index command instead of

the
vlookup command because in the vlookup command you run the risk of getting
values for approximate matches. In the index function, you can find exact
matches by specifying 0 in the last syntax of the function. more help is
available inthe Help menu

Regards

" wrote:

I need to create a formula that will compare the contents of cells
A2:A2000, to the contents of cells A2:A2000 in another worksheet
('schools'), and when finding 2 values that match, I need to bring the
contents of the corresponding cell in column B from 'schools' into the
first worksheet.

How do I go about setting this up?

KLR






  #6   Report Post  
Junior Member
 
Posts: 23
Default

use VLOOKUP
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
Why does Excel show a formula in ONE cell ? edpaul Excel Discussion (Misc queries) 1 August 12th 05 07:29 PM
Excel CHALLENGE...3 questions(indirect,rank,array formula)... Mlowry Excel Worksheet Functions 8 August 1st 05 07:34 AM
converting formula from lotus.123 to excel zaharah Excel Worksheet Functions 2 July 27th 05 03:04 PM
How do I get the formula bar in excel 2003 unionhall Excel Discussion (Misc queries) 1 February 17th 05 10:10 AM
Suddenly Excel can't calculate formula!!! Bob H Excel Worksheet Functions 2 November 30th 04 08:35 PM


All times are GMT +1. The time now is 08:20 PM.

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

About Us

"It's about Microsoft Excel"