ArmstrongArcade
New Member
Hey Chandoo'ers,
I am a little lost in my own creation, everything is working in the formula but I cannot figure a way to return unique PayDescription and associated DivisionDepartmentNo. If I run UNIQUE(DivisionDepartmentNo,$CG$12:$CH$3000), or UNIQUE(PayDescription,$CJ$12:$CJ$3000), the formula returns with #N/A's.
Any help or comment, or suggestion would be appriciated. Thank you.
The current return:
The return I am aiming for:
Note: I understand and use LAMBDA, but I know I don't fully comprehend nor utilize it to its full potential.
I am a little lost in my own creation, everything is working in the formula but I cannot figure a way to return unique PayDescription and associated DivisionDepartmentNo. If I run UNIQUE(DivisionDepartmentNo,$CG$12:$CH$3000), or UNIQUE(PayDescription,$CJ$12:$CJ$3000), the formula returns with #N/A's.
Any help or comment, or suggestion would be appriciated. Thank you.
The current return:
GLs | Pay Descriptions |
10-102 | Earning-Rate 1 - Reg |
10-102 | Earning-Rate 1 - Reg |
10-102 | Earning-Rate 1 - Reg |
10-102 | Earning-Rate 1 - Reg |
10-102 | Earning-PTO - Reg |
The return I am aiming for:
GLs | Pay Descriptions |
10-102 | Earning-Rate 1 - Reg |
10-102 | Earning-PTO - Reg |
Note: I understand and use LAMBDA, but I know I don't fully comprehend nor utilize it to its full potential.
Code:
=LET(
ReconDivDept,UNIQUE(SORT(FILTER(DX2:DX250,DX2:DX250<>""))),
PayrollTaxes,MAKEARRAY(ROWS(ReconDivDept),1,LAMBDA(r,c,"PayrollTaxes")),
WC_LPI,MAKEARRAY(ROWS(ReconDivDept),1,LAMBDA(r,c,"WC&LPI")),
Benefits,MAKEARRAY(ROWS(ReconDivDept),1,LAMBDA(r,c,"Benefits")),
HR_FT,MAKEARRAY(ROWS(ReconDivDept),1,LAMBDA(r,c,"HRServices&ComplianceFT")),
HR_PT,MAKEARRAY(ROWS(ReconDivDept),1,LAMBDA(r,c,"HRServices&CompliancePT")),
CoEmpRisk,MAKEARRAY(ROWS(ReconDivDept),1,LAMBDA(r,c,"Co-Emp.Risk")),
Here>DivisionDepartmentNo,$CG$12:$CH$3000,
Here>PayDescription,$CJ$12:$CJ$3000,
CleanedDivDept,FILTER(BYROW(DivisionDepartmentNo,LAMBDA(row,IF(COUNTA(row)=0,"",TEXTJOIN("-",TRUE,SUBSTITUTE(row,"'",""))))),BYROW(DivisionDepartmentNo,LAMBDA(row,COUNTA(row)>0))),
CleanedPayDesc,FILTER(PayDescription,PayDescription<>""),
VSTACK(
HSTACK(CleanedDivDept,CleanedPayDesc),
HSTACK(ReconDivDept,PayrollTaxes),
HSTACK(ReconDivDept,WC_LPI),
HSTACK(ReconDivDept,Benefits),
HSTACK(ReconDivDept,HR_FT),
HSTACK(ReconDivDept,HR_PT),
HSTACK(ReconDivDept,CoEmpRisk)))