ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Is there a function for this? (https://www.excelbanter.com/excel-worksheet-functions/70448-there-function.html)

JBoulton

Is there a function for this?
 
code value A value B value C value D test
1 5,000 250 5,000 0
1 10,000 250 500 9,250
2 20,000 5,000 500 14,500
3 5,000 500 600 5,000 0
3 10,000 7,000 800 2,200
3 20,000 30,000 0
Total test 25,950

1 9,250
2 14,500
3 2,200
Total test 25,950


The "test" field contains =MAX(0,B2-C2-D2-E2) Is there a function that will
sum that formula by the "code" field without using the "test" field?
--
Jim

daddylonglegs

Is there a function for this?
 

Perhaps this

=SUMPRODUCT(--(A2:A7=1),--(B2:B7-C2:C7-D2:D7-E2:E70),B2:B7-C2:C7-D2:D7-E2:E7)


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=510283


JBoulton

Is there a function for this?
 
Very cool daddy!

I use similar sumproduct configurations but couldn't figure this one out.

Thanks.
--
Jim


"daddylonglegs" wrote:


Perhaps this

=SUMPRODUCT(--(A2:A7=1),--(B2:B7-C2:C7-D2:D7-E2:E70),B2:B7-C2:C7-D2:D7-E2:E7)


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=510283




All times are GMT +1. The time now is 02:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com