Forum Discussion
Returning Multiple Lines from one cell, but in a list
- Mar 15, 2023
I'll step you through my solution.
Dynamic named item 'Data'. It expands/contracts based on number of entries in Column A:
=LET(a, Data!$A$2:$G$100000, nonblank, COUNTA(TAKE(a, , 1)), TAKE(a, nonblank))Dynamic named item 'Tasks'. Same idea as the above. It will expand/contract based on number of requested tasks entered.
=LET(a, Summary!$A$4:$A$10000, nonblank, COUNTA(a), TAKE(a, nonblank))An array constant - 'Header'. Nothing fancy here. It will be appended to the data pull.
={ "TASK NUMBER", "TASK DESCRIPTION", "TASK HOURS", "PART REQUIRED", "PART NUMBER", "PART QTY", "PART PRICE (EACH)" }Lambda 'PullTasks'. It runs each of the requested task numbers through a FILTER w/Data. Results are stacked vertically.
=LET(filtered, FILTER(Data, TAKE(Data, , 1) = v), VSTACK(a, filtered))The formula you'll see in the sheet:
=REDUCE(Header,Tasks,PullTasks)
I'll step you through my solution.
Dynamic named item 'Data'. It expands/contracts based on number of entries in Column A:
=LET(a, Data!$A$2:$G$100000, nonblank, COUNTA(TAKE(a, , 1)), TAKE(a, nonblank))
Dynamic named item 'Tasks'. Same idea as the above. It will expand/contract based on number of requested tasks entered.
=LET(a, Summary!$A$4:$A$10000, nonblank, COUNTA(a), TAKE(a, nonblank))An array constant - 'Header'. Nothing fancy here. It will be appended to the data pull.
={
"TASK NUMBER",
"TASK DESCRIPTION",
"TASK HOURS",
"PART REQUIRED",
"PART NUMBER",
"PART QTY",
"PART PRICE (EACH)"
}
Lambda 'PullTasks'. It runs each of the requested task numbers through a FILTER w/Data. Results are stacked vertically.
=LET(filtered, FILTER(Data, TAKE(Data, , 1) = v), VSTACK(a, filtered))The formula you'll see in the sheet:
=REDUCE(Header,Tasks,PullTasks)
Thank you so much!!!
- Patrick2788Mar 15, 2023Silver ContributorYou're welcome!