excel - INDEX MATCH obtaining values for duplicate names -


i have 1 example table following data in sheet1 following random data

------a ----------------- b ----------------------c ------------------------d   1 --first--------------last-----------------start date--------------end date   2 --john--------------smith--------------08/08/2014------------01/01/2015   3---john--------------smith--------------08/11/2014------------17/11/2014   4---john--------------smith--------------06/06/2014------------23/12/2014   5---abel--------------jones--------------14/05/2014------------29/04/2015   6---abel--------------jones--------------04/07/2014------------26/04/2015 

then have table in sheet2

------a ----------------- b ----------------------c ------------------------d       1 --first--------------last-----------------start date--------------end date       2 --john--------------smith---------------------------------------------------       3---john--------------smith---------------------------------------------------       4---john--------------smith---------------------------------------------------       5---abel--------------jones---------------------------------------------------       6---abel--------------jones---------------------------------------------------   

i using index match transfer data between 2 sheets.

=index(sheet1!$c:$c, match(1,index((sheet1!$a:$a=$a3)*(sheet1!$b:$b=$b3),0),0))  

to populate column c start dates sheet1.

=index(sheet1!$d:$d,     match(1,index((sheet1!$a:$a=$a3)*(sheet1!$b:$b=$b3),0),0))  

and populate column d end dates.

the problem is, when perform index match function, duplicate name, copy on first value. formula paste 08/08/2014 'john smith' start dates in column c of sheet2.

how obtain values c2 should 08/08/2014, c3 should 08/11/2014, c4 should 06/06/2014 etc.

one solution insert column in both sheets "running count" of instances of same name. example, insert col c , in c2 enter =if(a2&b2 = a1&b1, c1+1, 1). starts count @ 1 if concatenated first , last name new, , increases previous count 1 if not. have

first     last         count person john      smith        1 john      smith        2 john      smith        3 abel      jones        1 abel      jones        2 george    washington   1 thomas    jefferson    1 thomas    jefferson    2 

you can add column match() function (and change lookup column necessary).

edit: worth noting requires raw data sorted name.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -