Oct 25 2022 10:36 AM - edited Oct 25 2022 11:22 AM
Hi all,
First time posting here. (I have Excel 2019.) I've been experimenting with INDEX-MATCH function combinations over the last year or so, and I'm trying to create a more complicated formula that will automatically fill in as an array based on static data that is reuploaded into a different "Data Pull" sheet.
Below, I have included a screenshot of a workbook that I've been building to create an automated attendance database, including four distinct sheets:
What I'm trying to do is use the static absence data pull in "NSGP_Pull" to create automated formulas in the first sheet "FA22..." so that I can see in one place how many absences a student has (formula in column D), when that absence was (columns J:M), and the attached note (if it exists) to that absence (columns N:Q).
Some students have multiple absences, and I want to be able to automatically populate the columns J:Q with data associated with their absences.
I've crafted an INDEX-MATCH formula beginning in J2 of "FA22..." which successfully references data in "FA22..." and "NSGP_Pull" to find a value. This formula indexes the date of absence in "NSGP_Pull" that is associated with the unique email identifier 'NSGP_Pull'E and matches it with column C in "FA22..." The formula also works to fill in multiple results when auto-filled down. HOWEVER, I want it to autofill horizontally with multiple results of dates of absences - I just am not yet skilled enough to figure out how to manipulate the formula to do that.
Could you please help me find a solution to automating this workbook, or perhaps advise me on a better formula to use to accomplish what I'm aiming to do? Please let me know if I can provide more information.
Screenshot of Workbook: https://postimg.cc/TKM5sbwq
Screenshot of NSGP_Pull sheet: https://postimg.cc/fkbXFFnw
Thanks!
Blake
Oct 26 2022 01:56 PM
@byohojcu so, I figured out this problem by adding a COLUMNS function at the end of the statement, and introducing a SMALL IF with ROW functions.
Current formula:
{=IFERROR(INDEX(NSGP_Pull!$D$3:$D$425, SMALL(IF(NSGP_Pull!$E$3:$E$425=$C2, ROW(NSGP_Pull!$D$3:$D$425)-MIN(ROW(NSGP_Pull!$D$3:$D$425))+1), COLUMNS($C$2:C2))),"")}
Now, I'm stuck because I realize that I actually want to INDEX based on 2 conditions for an IF statement, and when I attempt to use AND, it doesn't allow me to autofill the formula/array as such.
For example, I want this:
{=IFERROR(INDEX(NSGP_Pull!$D$3:$D$425, SMALL(IF(AND(NSGP_Pull!$E$3:$E$425=$C2, NSGP_Pull!$F$3:$F$425=$F2 ROW(NSGP_Pull!$D$3:$D$425)-MIN(ROW(NSGP_Pull!$D$3:$D$425))+1), COLUMNS($C$2:C2))),"")}
Or, I want the formula to check that BOTH $C2 and $F2 match with their ranges in sheet NSGP_Pull before giving me a result.
Can anyone assist?
Thanks!
-Blake
Oct 26 2022 02:09 PM
Solution=IFERROR(INDEX(NSGP_Pull!$D$3:$D$425, SMALL(IF((NSGP_Pull!$E$3:$E$425=$C2) * ( NSGP_Pull!$F$3:$F$425=$F2), ROW(NSGP_Pull!$D$3:$D$425)-MIN(ROW(NSGP_Pull!$D$3:$D$425))+1), COLUMNS($C$2:C2))),"")
This works in my sheet. Enter the formula with ctrl+shift+enter if you don't work with Office365 or Excel 2021.
Oct 27 2022 05:49 AM
Oct 26 2022 02:09 PM
Solution=IFERROR(INDEX(NSGP_Pull!$D$3:$D$425, SMALL(IF((NSGP_Pull!$E$3:$E$425=$C2) * ( NSGP_Pull!$F$3:$F$425=$F2), ROW(NSGP_Pull!$D$3:$D$425)-MIN(ROW(NSGP_Pull!$D$3:$D$425))+1), COLUMNS($C$2:C2))),"")
This works in my sheet. Enter the formula with ctrl+shift+enter if you don't work with Office365 or Excel 2021.