I presented this problem yesterday and want to shout out to VertexVortex for his solution. When I implemented my demo formulas on the working copy of the worksheet, I couldn’t get it to work — the formulas on my second sheet beyond the first row aren’t outputting correctly. The original thread is here:
The purpose of this workbook is that as a tester runs through each step, they mark off whether the product passed or failed. If the step fails, the tester records notes as to why this happened. On the second sheet, the “executive summary”, I need it to output a list of all the steps that failed and the notes as to why it failed.
Here’s a screenshot of the first worksheet — the “steps” and pass/fail checkboxes
Here’s the second worksheet — where the failed steps and notes are supposed to be output
The first two formulas on the second sheet work — returning the first step that fails and the notes from that step. For those cells, thanks to VertexVortex, I used:
=INDEX(tests,MATCH(TRUE,fails,0)) ///formula for 'section/step' cell
=INDEX(notes,MATCH(TRUE,fails,0)) ///formula to output notes from first fail
I should also mention that I was told to create named ranges on the first worksheet — ‘tests’ is the column noting the section/step, ‘fails’ is the named ranged for the column containing the fail checkboxes, and ‘notes’ is the named range for the column containing the notes as to why the step failed.
The rows beyond that though have me confused — the formula worked on the demo I had setup in my previous post, but are no longer returning any values. The formulas I have are:
=IFERROR(INDEX(OFFSET(tests,MATCH(K57,tests,0),0),MATCH(TRUE,OFFSET(fails,MATCH(K57,tests,0),0),0)),"") ///formula for outputting the second 'section/step' cell that has failed
=IFERROR(INDEX(OFFSET(notes,MATCH(K57,tests,0),0),MATCH(TRUE,OFFSET(fails,MATCH(K57,tests,0),0),0)),"") //formula to output the notes from the second fail
If there’s a way to make this happen that involves a macro or different solution, I’m all ears. I appreciate everyone’s help with this.
OFFSETcan’t work on a full column, so you should change your named ranges to actual cell ranges. makefails(and the other ranges) equal=Testing!$R$1:$R$10000(you can edit this by pressing CTRL+F3), and this made it work for me.But testing this a little further, this formula breaks if there are tests/steps with the same name, like
25. Enter City/equivalent, because the ‘history’ lookup relies on starting from the name of the previous found test.I would suggest using a bit different method, of narrowing your range after each found
TRUE, by adding a utility column in the Executive Summary worksheet (I used column H).In the Step and Notes columns, use
and in the new column , in the first cell (H57), put
=MATCH(TRUE,fails,0)and in the following rows,and this should do the trick.
edit: I intentionally didn’t use
IFERRORin the latter column, so that debugging if needed will be easier.