View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
investor9987 investor9987 is offline
external usenet poster
 
Posts: 1
Default How can I handle duplicates in an Index function?

I want to use the VLOOKUP/MATCH/INDEX function to dynamically assign a
persons name to a record based on a zip code. I know how to do this but the
problem is that I can sometimes have in my table multiple people sharing a
zipcode and I was wondering if anyone has ever written a formula that would
cycle through the duplicates distributing out evenly amongst the people
sharing that zip.

Example:
37075 Smith
37078 Jones
38080 Brown
38080 Davis
38080 Daniels
38091 Owens

When the zip is 37075, I would want Smith assigned. When the zip is 38080,
I would want Brown assigned, then the next time I would want Davis assigned
to it, then the third time it would be Daniels. Then the assignments would
start over so that Brown would be assigned the fourth time that 38080 hits.

Does anyone know of a function within excel that would do this?