How do i sum selected time value

ichibuzor

New Member
Joined
Sep 20, 2015
Messages
12
(AK)
(AL)
(AM)
SUBJECT
HR ACHIEVED
HR NOT ACHIEVED
STANDARD
112)MICROSOFT SQL
5:25
6:3512:00
113) XCEL OR ACCESS
2:190:192:00
114)YOUTUBE
0:002:002:00
115)RESEARCH
1:272:334:00
116) READING(EXCEL&OTH
1:546:068:00
117) JUBILEE ASSOCIATES
5:041:044:00
118) FORBES(READING)
2:172:435:00
119)CATCH-UP (sat &sun)
0:000:000:00
SUM 118:26#VALUE!181:00

<colgroup><col style="mso-width-source:userset;mso-width-alt:6546;width:134pt" width="179"> <col style="mso-width-source:userset;mso-width-alt:5668;width:116pt" width="155"> <col style="mso-width-source:userset;mso-width-alt:3510;width:72pt" width="96"> <col style="width:48pt" width="64"> </colgroup><tbody>
</tbody>
THE CODE FOR HOURS NOT ACHIEVED = IF(AM112>AK112,AM112-AK112,AK112-AM112)
THE PROBLEM IS I WISH TO SUM ONLY VALUES (HOURS NOT ACHIEVED) WHERE HOURS ACHIEVED IS GREATER THAN THE STANDARD HOURS E.G AL113+AL117. CAN'T THERE BE ANY AUTOMATED CODE? I TRIED USING THIS SUMIFS(AK112:AM119,AL112:AL119,AK112>AM112,AL112:AL119,AK113>AM113,AL112:AL119,AK114>AM114,AL112:AL119,AK115>AM115,AL112:AL119,AK116>AM116,AL112:AL119,AK117>AM117,AL112:AL119,AK118>AM118,AL112:AL119,AK119>AM119) BUT IT NEVER WORKED. PLEASE HELP ME OUT.
THANKS
REGARDS,
CHIBS
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Try

=SUMPRODUCT(--(AK112:AK119>AM112:AM119),AL112:AL119)

Dear Sir,
I tried it but it failed to work.
Secondly, I wanted to find out about the -- indicated above means you are trying to tell the computer to ignore the code (AK112:AK119>AM112:AM119). Am I right? I also tried it removing and putting it but none worked.
Thanks
Kind regards,
Chibs
 
Upvote 0
It works fine for me with your sample. When you say fail what answer are you getting?
 
Upvote 0
It works fine for me with your sample. When you say fail what answer are you getting?

Dear Sir,
It is giving me 0:00 value. I have tried all possible means but I guess there is a problem somewhere.
Also, what is the use of -- in the code? Could you also explain the code so that I can learn from the expert.
 
Upvote 0
The -- forces 1 or 0 instead of True or False. So where Hr achieved is greater than Standard it will return True which becomes 1 that is the multiplied by the value in Hr not achieved, then all the values are summed.

Did you enter the formula exactly as i posted? It works for me!

Code:
[TABLE="width: 376"]
<tbody>[TR]
[TD]SUBJECT[/TD]
[TD]HR ACHIEVED[/TD]
[TD]HR NOT ACHIEVED[/TD]
[TD]STANDARD[/TD]
[/TR]
[TR]
[TD]112)MICROSOFT SQL[/TD]
[TD="align: right"]05:25[/TD]
[TD="align: right"]06:35[/TD]
[TD="align: right"]12:00[/TD]
[/TR]
[TR]
[TD]113) XCEL OR ACCESS[/TD]
[TD="align: right"]02:19[/TD]
[TD="align: right"]00:19[/TD]
[TD="align: right"]02:00[/TD]
[/TR]
[TR]
[TD]114)YOUTUBE[/TD]
[TD="align: right"]00:00[/TD]
[TD="align: right"]02:00[/TD]
[TD="align: right"]02:00[/TD]
[/TR]
[TR]
[TD]115)RESEARCH[/TD]
[TD="align: right"]01:27[/TD]
[TD="align: right"]02:33[/TD]
[TD="align: right"]04:00[/TD]
[/TR]
[TR]
[TD]116) READING(EXCEL&OTH[/TD]
[TD="align: right"]01:54[/TD]
[TD="align: right"]06:06[/TD]
[TD="align: right"]08:00[/TD]
[/TR]
[TR]
[TD]117) JUBILEE ASSOCIATES[/TD]
[TD="align: right"]05:04[/TD]
[TD="align: right"]01:04[/TD]
[TD="align: right"]04:00[/TD]
[/TR]
[TR]
[TD]118) FORBES(READING)[/TD]
[TD="align: right"]02:17[/TD]
[TD="align: right"]02:43[/TD]
[TD="align: right"]05:00[/TD]
[/TR]
[TR]
[TD]119)CATCH-UP (sat &sun)[/TD]
[TD="align: right"]00:00[/TD]
[TD="align: right"]00:00[/TD]
[TD="align: right"]00:00[/TD]
[/TR]
[TR]
[TD]SUM 1[/TD]
[TD="align: right"]18:26[/TD]
[TD="align: right"]21:20[/TD]
[TD="align: right"]37:00[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"][U][B][COLOR=#ff0000]1:23[/COLOR][/B][/U][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Dear Sir,
Thanks a bunch!!! it worked very well. I was careless with the formula and writing =SUMPRODUCT(--(AK112:AK119>AM112:AM119,AL112:AL119) instead of SUMPRODUCT(--(AK112:AK119>AM112:AM119),AL112:AL119).

Secondly, I will like to know the various kind of business Analysis I could do with for a pharmaceutical business who has wholesale operations and have five stores each with a miniwarehouse and two main warehouse. The company sells different pharmceutical product in wholesale e.g Felgin (pain killer), Mebotex (deworming) etc.
Thanks
 
Upvote 0

Forum statistics

Threads
1,215,086
Messages
6,123,033
Members
449,092
Latest member
ikke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top