indexing - Excel: Index Match using criteria, show unique values? -
i trying create calendar in excel. have sheet 1 contains calendar template so:
april 8 april 9 april 10 april 11 april 12 subjecta subjectd subjectg subjectj subjectk descriptiona decriptiond descriptiong descriptionj desc k subjectb subjecte subjecth descriptionb descriptione descriptionh subjectc subjectf subjecti descriptionc descriptionf descriptioni
i have rows of data in sheet 2 so:
id date subject description 1 08/04/2016 subjecta descrptiona 2 08/04/2016 subjectb descriptionb 3 08/04/2016 subjectc descriptionc 4 09/04/2016 subjectd descriptiond 5 09/04/2016 subjecte descriptione 6 09/04/2016 subjectf descriptionf 7 10/04/2016 subjectg descriptiong 8 10/04/2016 subjecth descriptionh 9 10/04/2016 subjecti descriptioni 10 11/04/2016 subjectj descriptionj 11 12/04/2016 subjectk desc k
basically want use index match formula in cells of calendar give me 'subjects' dates match.
for instance on sheet 2 there 3 rows subjects 'a','b', , 'c' date 08th april. therefore these should show in calendar on sheet 1 under 08th april.
i trying use formula this:
=index(data!$g$2:$g$5000, match(0, countif(calendar!$g$18:$g18, data!$g$2:$g$5000), 0))
this should pull through subjects have matching date , display unique values. it's not working, pulls through result without ensuring dates match, , doesn't show unique values shows same value again , again.
i think need define date match in formula somewhere not sure how, or where?
please can show me going wrong?
thanks in advance
to multiple solutions need array formula row rows index small (assuming dates in column b , subjects in d)
=index(data!$d:$d,small(if(data!$b$2:$b$5000=calendar!$g$18,row($2:$5000)),xxx))
this array formula , needs confirmed ctrl + shift + enter
simply change xxx
1 first match, 2 second , on.
if still have questions ask ;)
(done phone, may contain errors)
Comments
Post a Comment