Hi all,
With help from the internet, I was able to find out the first and last test attempt for a user using an array formula, but I'm having trouble adapting it to look at TWO criteria (Name and Course). Because it is only currently looking at name, users that attempt Course 2 more times than Course 1, won't show a last attempt for Course 1 (and vice versa).
I'm hoping you can help me adapt the following array formula to look at both Name and Course to find out if a cell's value is the MAX in the series (preferably WITHOUT a helper column).
Current Formula (in F2):
{=IF(E2=1,"First", IF(E2=MAX(IF(A:A=A2,E:E)),"Last",""))}
Sample Table:
[TABLE="width: 831"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Course[/TD]
[TD]Question #[/TD]
[TD]Correct?[/TD]
[TD]Attempt #[/TD]
[TD]First or Last Attempt?[/TD]
[TD]Notes[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 1[/TD]
[TD]1[/TD]
[TD]N[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 1[/TD]
[TD]2[/TD]
[TD]Y[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 1[/TD]
[TD]3[/TD]
[TD]N[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 1[/TD]
[TD]1[/TD]
[TD]N[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 1[/TD]
[TD]2[/TD]
[TD]N[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 1[/TD]
[TD]3[/TD]
[TD]Y[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 1[/TD]
[TD]1[/TD]
[TD]Y[/TD]
[TD]3[/TD]
[TD] [/TD]
[TD]<-- This should be last attempt for Course 1, but is taking last attempt for Course 2 because it's only comparing against Name, not Name AND Course[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 1[/TD]
[TD]2[/TD]
[TD]Y[/TD]
[TD]3[/TD]
[TD] [/TD]
[TD]<-- This should be last attempt for Course 1, but is taking last attempt for Course 2 because it's only comparing against Name, not Name AND Course[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 1[/TD]
[TD]3[/TD]
[TD]Y[/TD]
[TD]3[/TD]
[TD] [/TD]
[TD]<-- This should be last attempt for Course 1, but is taking last attempt for Course 2 because it's only comparing against Name, not Name AND Course[/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Course 1[/TD]
[TD]1[/TD]
[TD]Y[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Course 1[/TD]
[TD]2[/TD]
[TD]N[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Course 1[/TD]
[TD]3[/TD]
[TD]N[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Course 1[/TD]
[TD]1[/TD]
[TD]Y[/TD]
[TD]2[/TD]
[TD]Last[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Course 1[/TD]
[TD]2[/TD]
[TD]Y[/TD]
[TD]2[/TD]
[TD]Last[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Course 1[/TD]
[TD]3[/TD]
[TD]Y[/TD]
[TD]2[/TD]
[TD]Last[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 2[/TD]
[TD]1[/TD]
[TD]N[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 2[/TD]
[TD]2[/TD]
[TD]N[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 2[/TD]
[TD]3[/TD]
[TD]N[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 2[/TD]
[TD]4[/TD]
[TD]Y[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 2[/TD]
[TD]1[/TD]
[TD]Y[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 2[/TD]
[TD]2[/TD]
[TD]N[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 2[/TD]
[TD]3[/TD]
[TD]Y[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 2[/TD]
[TD]4[/TD]
[TD]N[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 2[/TD]
[TD]1[/TD]
[TD]N[/TD]
[TD]3[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 2[/TD]
[TD]2[/TD]
[TD]Y[/TD]
[TD]3[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 2[/TD]
[TD]3[/TD]
[TD]Y[/TD]
[TD]3[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 2[/TD]
[TD]4[/TD]
[TD]N[/TD]
[TD]3[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 2[/TD]
[TD]1[/TD]
[TD]Y[/TD]
[TD]4[/TD]
[TD]Last[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 2[/TD]
[TD]2[/TD]
[TD]Y[/TD]
[TD]4[/TD]
[TD]Last[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 2[/TD]
[TD]3[/TD]
[TD]Y[/TD]
[TD]4[/TD]
[TD]Last[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 2[/TD]
[TD]4[/TD]
[TD]Y[/TD]
[TD]4[/TD]
[TD]Last[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Course 2[/TD]
[TD]1[/TD]
[TD]Y[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Course 2[/TD]
[TD]2[/TD]
[TD]Y[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Course 2[/TD]
[TD]3[/TD]
[TD]Y[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Course 2[/TD]
[TD]4[/TD]
[TD]Y[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
</tbody><colgroup><col span="2"><col><col><col><col><col></colgroup>[/TABLE]
With help from the internet, I was able to find out the first and last test attempt for a user using an array formula, but I'm having trouble adapting it to look at TWO criteria (Name and Course). Because it is only currently looking at name, users that attempt Course 2 more times than Course 1, won't show a last attempt for Course 1 (and vice versa).
I'm hoping you can help me adapt the following array formula to look at both Name and Course to find out if a cell's value is the MAX in the series (preferably WITHOUT a helper column).
Current Formula (in F2):
{=IF(E2=1,"First", IF(E2=MAX(IF(A:A=A2,E:E)),"Last",""))}
Sample Table:
[TABLE="width: 831"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Course[/TD]
[TD]Question #[/TD]
[TD]Correct?[/TD]
[TD]Attempt #[/TD]
[TD]First or Last Attempt?[/TD]
[TD]Notes[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 1[/TD]
[TD]1[/TD]
[TD]N[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 1[/TD]
[TD]2[/TD]
[TD]Y[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 1[/TD]
[TD]3[/TD]
[TD]N[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 1[/TD]
[TD]1[/TD]
[TD]N[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 1[/TD]
[TD]2[/TD]
[TD]N[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 1[/TD]
[TD]3[/TD]
[TD]Y[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 1[/TD]
[TD]1[/TD]
[TD]Y[/TD]
[TD]3[/TD]
[TD] [/TD]
[TD]<-- This should be last attempt for Course 1, but is taking last attempt for Course 2 because it's only comparing against Name, not Name AND Course[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 1[/TD]
[TD]2[/TD]
[TD]Y[/TD]
[TD]3[/TD]
[TD] [/TD]
[TD]<-- This should be last attempt for Course 1, but is taking last attempt for Course 2 because it's only comparing against Name, not Name AND Course[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 1[/TD]
[TD]3[/TD]
[TD]Y[/TD]
[TD]3[/TD]
[TD] [/TD]
[TD]<-- This should be last attempt for Course 1, but is taking last attempt for Course 2 because it's only comparing against Name, not Name AND Course[/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Course 1[/TD]
[TD]1[/TD]
[TD]Y[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Course 1[/TD]
[TD]2[/TD]
[TD]N[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Course 1[/TD]
[TD]3[/TD]
[TD]N[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Course 1[/TD]
[TD]1[/TD]
[TD]Y[/TD]
[TD]2[/TD]
[TD]Last[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Course 1[/TD]
[TD]2[/TD]
[TD]Y[/TD]
[TD]2[/TD]
[TD]Last[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Course 1[/TD]
[TD]3[/TD]
[TD]Y[/TD]
[TD]2[/TD]
[TD]Last[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 2[/TD]
[TD]1[/TD]
[TD]N[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 2[/TD]
[TD]2[/TD]
[TD]N[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 2[/TD]
[TD]3[/TD]
[TD]N[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]Course 2[/TD]
[TD]4[/TD]
[TD]Y[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]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TD]4[/TD]
[TD]Y[/TD]
[TD]4[/TD]
[TD]Last[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Course 2[/TD]
[TD]1[/TD]
[TD]Y[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Course 2[/TD]
[TD]2[/TD]
[TD]Y[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Course 2[/TD]
[TD]3[/TD]
[TD]Y[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Mary[/TD]
[TD]Course 2[/TD]
[TD]4[/TD]
[TD]Y[/TD]
[TD]1[/TD]
[TD]First[/TD]
[TD] [/TD]
[/TR]
</tbody><colgroup><col span="2"><col><col><col><col><col></colgroup>[/TABLE]