Hello
I am using Excel 365 and summarizing from a data table. Below gives me the data that I want but a) is it possible to programmatically format columns D and F with 1 decimal point and a % sign; and b) how can I programmatically sort column 6 (F) in descending order? Thanks for any and all assistance.
Results (minus the sort):
I am using Excel 365 and summarizing from a data table. Below gives me the data that I want but a) is it possible to programmatically format columns D and F with 1 decimal point and a % sign; and b) how can I programmatically sort column 6 (F) in descending order? Thanks for any and all assistance.
VBA Code:
=LET(CC,(UNIQUE(FILTER(C_MRP,(C_Serv=J1)*(C_Date>=H1)*(C_Date<=H2)*(C_Denom>0)))),
CHOOSE({1,2,3,4,5,6,7},CC,COUNTIFS(C_Serv,J1,C_MRP,CC,C_Date,">="&H1,C_Date,"<="&H2,C_Denom,">0",C_Status,"=Y"),
COUNTIFS(C_Serv,J1,C_MRP,CC,C_Date,">="&H1,C_Date,"<="&H2,C_Denom,">0",C_Status,"=D"),
ROUND(COUNTIFS(C_Serv,J1,C_MRP,CC,C_Date,">="&H1,C_Date,"<="&H2,C_Denom,">0",C_Status,"=Y")*100/SUMIFS(C_Denom,C_Serv,J1,C_MRP,CC,C_Date,">="&H1,C_Date,"<="&H2,C_Denom,">0"),1),
COUNTIFS(C_Serv,J1,C_MRP,CC,C_Date,">="&H1,C_Date,"<="&H2,C_Denom,">0",C_Status,"=N"),
ROUND(COUNTIFS(C_Serv,J1,C_MRP,CC,C_Date,">="&H1,C_Date,"<="&H2,C_Denom,">0",C_Status,"=N")*100/SUMIFS(C_Denom,C_Serv,J1,C_MRP,CC,C_Date,">="&H1,C_Date,"<="&H2,C_Denom,">0"),1),
SUMIFS(C_Denom,C_Serv,J1,C_MRP,CC,C_Date,">="&H1,C_Date,"<="&H2,C_Denom,">0")))
Results (minus the sort):