Excel Formula to get product of values in two columns by excluding hidden rows - Stack Overflow

I have an excel sheet with following tables:ProjectRateJan_HrsFeb_HrsMar_HrsP13346P12435P2

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

Share Improve this question edited Mar 26 at 20:35 Mayukh Bhattacharya 27.8k9 gold badges29 silver badges42 bronze badges asked Mar 26 at 19:47 AhmadAhmad 154 bronze badges 0
Add a comment  | 

1 Answer 1

Reset to default 1

You 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条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信