Forum Discussion
Operations Dashboard in Excel
So 3 very capable volunteers have answered, but I think I'm reading your question differently. It sounds like you have what you want but just want to rearrange those outputs in the second column to line up with the prior column. This is hard to accurately answer without knowing the formula(s) (assuming those are based on formulas) you are using. In particular if that is the output of individual formulas (i.e. using traditional non-array formulas), or a sindle array formula for each column, or a more complicated array formula outputing multiple columns.
That said, here is a LAMBDA function that you can use to rearrange a list output to match a prior list where possible and 'fill in' the non-matching items:
=LET(in, B2:.B99, prior, A2:.A99,
AlignLists, LAMBDA(listNew,listOld, LET(
InsertItem, LAMBDA(value,list,insertIndex, IF(insertIndex=1,VSTACK(value,DROP(list,1)),
IF(insertIndex>ROWS(list), VSTACK(EXPAND(list,insertIndex-1,,""),value),
IF(insertIndex=ROWS(list), VSTACK(DROP(list,-1),value),
VSTACK(TAKE(list,insertIndex-1),value,DROP(list,insertIndex)))))),
AlignMatches, LAMBDA(matches,prior,
REDUCE("",in,LAMBDA(p,x, LET(I,XMATCH(x,prior), IF(ISNUMBER(I),InsertItem(x,p,I),p))))),
Fillin, LAMBDA(values,list, REDUCE(list, values, LAMBDA(p,q, LET(i, XMATCH("",p), InsertItem(q,p,IF(ISNUMBER(i),i,ROWS(p)+1)))))),
MatchedList, AlignMatches(in,prior),
nonMatches, UNIQUE(VSTACK(MatchedList,in,"",""),,1),
Fillin(nonMatches,MatchedList)
)),
AlignLists(in,prior))and showing it in action:
so that formula has the 'inputs' on line 1 and the output is generated on line 14. The rest of it from line 2 to line 13 is a single LAMBDA function made up of 3 sub-functions. So if you want to do this a lot on the sheet then I highly recommend you save that AlignLists LAMBDA function into your NAME MANAGER (under the Formula tab).
So before I get into lots of details on how to do it or how this works, please just let me know:
a) does this sounds like what you want/need
b) do you need help implementing it? (if so more info on your formulas and sheet structure would help)
c) do you need/want an explanation on how it works (i.e. breakdown of the steps and sub-functions)
- Siddhi817Mar 13, 2026Copper Contributor
Hi Tarler,
Thanks for sharing this. I will have a look at this solution. Unfortunately, I am still a beginner when it comes to Lambda function.