View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Comparing 2 sets of data to fill in gaps

An Index n Match (Just the "Index" part of it that you're missing)

An example
Assume your source list is in Sheet1's cols A and B,
names in col A, amts in col B
In Sheet2,
if you have the names listed in A1 down
place this in B1: =INDEX(Sheet1!B:B,MATCH(A1,Sheet1!A:A,0))
Copy down to return the amts corresponding to the names listed in col A

This part: INDEX(Sheet1!B:B
is simply what you want returned as a result of the match.
The return col can be to the left or right of the col that's being matched

And if you need an error trap to return neater looking blanks: "" instead of
ugly #N/As for any unmatched names, use this in B1:
=IF(ISNA(MATCH(A1,Sheet1!A:A,0)),"",INDEX(Sheet1!B :B,MATCH(A1,Sheet1!A:A,0)))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"Awrex" wrote:
I have two sets of data both have names and one has a dollar value
associated with the name. Need to compare names and have the dollar valued
filled in the one without.

Match seems to be on the right track but it doesn' quite work how I'd hoped.

Thanks!!