View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ExcelMonkey ExcelMonkey is offline
external usenet poster
 
Posts: 553
Default Repost (Comparing two ranges)

Apologies for the re-post. Need to clarify this to avoid confusion. Is is
possible to compare two ranges and return a list of booleans illustrating
where the values in one range reside in the other.

Assume Range 1 is as follows (A1:A10):
Dog
Cat
Man
Women
Car
Rain
Black
In
Peter
Acid

Assume Range 2 is as follows (A12:A16):
Rain
Blue
Mary
Stick
Dog

In cell A17, I want to insert a SUMPRODUCT function. For the first range
variable of the SUMPRODUCT, I want to illustrate where the items in Range 2
reside in Range 1 as follows. {1,0,0,0,0,1,0,0,0,0} showing that both "Rain"
and "Dog" reside in Range 1 in positions 1 and 6. The the first range in the
SUMPRODUCT function would look like this if you highlighted in and hit F9:

SUMPRODUCT({1,0,0,0,0,1,0,0,0,0}, Range2)

Any ideas on what type of logic I would use within this SUMPRODUCT function
to create the boolean data above?

Thanks

EM