I have an excel sheet with following tables:
Project | Rate | Jan_Hrs | Feb_Hrs | Mar_Hrs |
---|---|---|---|---|
P1 | 3 | 3 | 4 | 6 |
P1 | 2 | 4 | 3 | 5 |
P2 | 3 | 3 | 2 | 5 |
P1 | 3 | 4 | 4 | 4 |
P3 | 4 | 3 | 3 | 2 |
P2 | 4 | 4 | 3 | 4 |
Total | 66 | 60 | 79 |
I have an excel sheet with following tables:
Project | Rate | Jan_Hrs | Feb_Hrs | Mar_Hrs |
---|---|---|---|---|
P1 | 3 | 3 | 4 | 6 |
P1 | 2 | 4 | 3 | 5 |
P2 | 3 | 3 | 2 | 5 |
P1 | 3 | 4 | 4 | 4 |
P3 | 4 | 3 | 3 | 2 |
P2 | 4 | 4 | 3 | 4 |
Total | 66 | 60 | 79 |
and I am getting the total with the formula =SUM($P$2:$P$7*Q2:Q7)
Now I need to add a filter on Project, so that user can filter by Project and I want my formula to exclude hidden rows.
I have tried =Subtotal(109, $P$2:$P$7*Q2:Q7)
but that give me error. I have tried some other combinations like =SUMPRODUCT(--SUBTOTAL(103,B2:B7),B2:B7,C2:C7)
but nothing is working
1 Answer
Reset to default 1You could try using the following formula:
• Formula used in cell Q10
=SUM(MAP($O2:$O7,LAMBDA(x,SUBTOTAL(103,x)))*(Q2:Q7*$P2:$P7))
And if you prefer to fill all at once :
=BYCOL(MAP(O2:O7,LAMBDA(y,SUBTOTAL(103,y)))*(Q2:S7*P2:P7),SUM)
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744128834a4559740.html
评论列表(0条)