vendredi 7 juin 2019

Select a date in drop down, search a through colums to the mathcing date and return all the name values with a 1, for a given date

I have an attendance sheet, names in the rows and dates in the columns. If a student is present, a "1" value is assigned, if absent an "x".

On a separate sheet, I created a drop down list to select a date from the columns.

I then use this formula: =IFERROR(SMALL(IF((GANTT!$FT$14:$FT$1003=1),GANTT!$A$14:$A$1003,""),ROW()-16),"")

to generate a list of students who attended on this particular day. In this case, the column FT has corresponds to the date Sunday, Sept 9, 2018.

If I use my drop down to select a different date, how can I alter the formula to change the column address FT only. For example, if I want to see the list of people on Monday, Sept 10, 2018, I would select that date and the Column value would change to FU.

=IFERROR(SMALL(IF((GANTT!$FU$14:$FU$1003=1),GANTT!$A$14:$A$1003,""),ROW()-16),"")

GANTT!$A$14:$A$1003 contains the list of names.

I was thinking using an INDIRECT/ ADDRESS/ SUBSTITUTE function and helper cells but there may be a more elegant way to achieve the same result.

I have not found a way to link the above formula that works to produce my list AND link it to my data validation drop down.

I think I melted my brain thinking about it. Any help will be appreciated!

From scratch, I want to select a date from a drop down, search that date in the columns of another sheet (GANTT) and then return the names of the students that have a 1 value in the cell that corresponds to the date that I selected.

Aucun commentaire:

Enregistrer un commentaire