total (weight) per shift and date calculated in every row of 1st trip

LearningByDoing

New Member
Joined
Aug 17, 2023
Messages
11
Office Version
  1. 365
Platform
  1. Windows
  2. Web
Hello together,

I have the following problem.

I want the total weight of the tonnage per shift (Column shift - 1 or 2) and by date. The total weight should be added in each row of the 1st trip.

As can be seen in the column "My incomplete result", I have succeeded for the 1st shift. The formula I used for the calculation: =IF($D4=1;SUM(IF($A4:$A57=$A4;IF($C4:$C57=1;$E4:$E57); "#N/A")); "#N/A")

With the calculation and representation of the 2nd shift I have my difficulties. Complementary difficulty is that I want to have the calculation and representation in one column.

It would be great if not only a solution was presented, but also why this solution was chosen. I would like to understand how the approach to the solution was made.

Would you like more information? I will be happy to provide it.

Thank you in advance.

Janus


Desired ResultFormel:
=IF($D4=1;SUM(IF($A4:$A57=$A4;IF($C4:$C57=1;$E4:$E57);"#N/A"));"#N/A")
datecodeshifttripweight [kg]Total Weight per shift and dateMy incomplete result so far
02.01.2023​
1​
1​
1​
23760​
93420​
93420​
02.01.2023​
1​
1​
2​
23840​
#N/A
02.01.2023​
1​
1​
3​
23500​
#N/A
02.01.2023​
1​
1​
4​
22320​
#N/A
02.01.2023​
1​
2​
1​
22960​
89100​
0​
02.01.2023​
1​
2​
2​
22320​
#N/A
02.01.2023​
1​
2​
3​
22560​
#N/A
02.01.2023​
1​
2​
4​
21260​
#N/A
03.01.2023​
1​
1​
1​
24440​
99340​
99340​
03.01.2023​
1​
1​
2​
24060​
#N/A
03.01.2023​
1​
1​
3​
25740​
#N/A
03.01.2023​
1​
1​
4​
25100​
#N/A
03.01.2023​
1​
2​
1​
24780​
171760​
0​
03.01.2023​
1​
2​
2​
23280​
#N/A
03.01.2023​
1​
2​
3​
23920​
#N/A
03.01.2023​
1​
2​
4​
23880​
#N/A
03.01.2023​
1​
2​
5​
25220​
#N/A
03.01.2023​
1​
2​
6​
25880​
#N/A
03.01.2023​
1​
2​
7​
24800​
#N/A
04.01.2023​
1​
1​
1​
23160​
233580​
233580​
04.01.2023​
1​
1​
2​
25120​
#N/A
04.01.2023​
1​
1​
3​
27580​
#N/A
04.01.2023​
1​
1​
4​
23300​
#N/A
04.01.2023​
1​
1​
5​
23000​
#N/A
04.01.2023​
1​
1​
6​
22120​
#N/A
04.01.2023​
1​
1​
7​
22800​
#N/A
04.01.2023​
1​
1​
8​
23680​
#N/A
04.01.2023​
1​
1​
9​
22000​
#N/A
04.01.2023​
1​
1​
10​
20820​
#N/A
04.01.2023​
1​
2​
1​
22300​
187740​
0​
04.01.2023​
1​
2​
2​
22300​
#N/A
04.01.2023​
1​
2​
3​
23180​
#N/A
04.01.2023​
1​
2​
4​
24300​
#N/A
04.01.2023​
1​
2​
5​
23860​
#N/A
04.01.2023​
1​
2​
6​
23700​
#N/A
04.01.2023​
1​
2​
7​
23700​
#N/A
04.01.2023​
1​
2​
8​
24400​
#N/A
05.01.2023​
1​
1​
1​
22600​
95460​
95460​
05.01.2023​
1​
1​
2​
24420​
#N/A
05.01.2023​
1​
1​
3​
25640​
#N/A
05.01.2023​
1​
1​
4​
22800​
#N/A
05.01.2023​
1​
2​
1​
22780​
160960​
0​
05.01.2023​
1​
2​
2​
23340​
#N/A
05.01.2023​
1​
2​
3​
23640​
#N/A
05.01.2023​
1​
2​
4​
23920​
#N/A
05.01.2023​
1​
2​
5​
24780​
#N/A
05.01.2023​
1​
2​
6​
21380​
#N/A
05.01.2023​
1​
2​
7​
21120​
#N/A
09.01.2023​
1​
1​
1​
23340​
117900​
117900​
09.01.2023​
1​
1​
2​
23700​
#N/A
09.01.2023​
1​
1​
3​
23600​
#N/A
09.01.2023​
1​
1​
4​
23040​
#N/A
09.01.2023​
1​
1​
5​
24220​
#N/A
09.01.2023​
1​
2​
1​
24040​
24040​
0​
SUM
1273300​
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hi, welcome to the forum! Here one option you can try:

Book3
ABCDEF
1datecodeshifttripweight [kg]Total Weight per shift and date
202.01.20231112376093420
302.01.202311223840 
402.01.202311323500 
502.01.202311422320 
602.01.20231212296089100
702.01.202312222320 
802.01.202312322560 
902.01.202312421260 
1003.01.20231112444099340
1103.01.202311224060 
1203.01.202311325740 
1303.01.202311425100 
1403.01.202312124780171760
1503.01.202312223280 
1603.01.202312323920 
1703.01.202312423880 
1803.01.202312525220 
1903.01.202312625880 
2003.01.202312724800 
2104.01.202311123160233580
2204.01.202311225120 
2304.01.202311327580 
2404.01.202311423300 
2504.01.202311523000 
2604.01.202311622120 
2704.01.202311722800 
2804.01.202311823680 
2904.01.202311922000 
3004.01.2023111020820 
3104.01.202312122300187740
3204.01.202312222300 
3304.01.202312323180 
3404.01.202312424300 
3504.01.202312523860 
3604.01.202312623700 
3704.01.202312723700 
3804.01.202312824400 
3905.01.20231112260095460
4005.01.202311224420 
4105.01.202311325640 
4205.01.202311422800 
4305.01.202312122780160960
4405.01.202312223340 
4505.01.202312323640 
4605.01.202312423920 
4705.01.202312524780 
4805.01.202312621380 
4905.01.202312721120 
5009.01.202311123340117900
5109.01.202311223700 
5209.01.202311323600 
5309.01.202311423040 
5409.01.202311524220 
5509.01.20231212404024040
Sheet1
Cell Formulas
RangeFormula
F2:F55F2=IF(AND(A2=A1,C2=C1),"",SUMIFS(E:E,A:A,A2,C:C,C2))
 
Upvote 1
Solution
@FormR (y)(y)
thanks a lot!

Now I have to make myself understand why my version of IF(AND as well as SUMIF did not work. Somewhere I had a thinking bug, because I tried different versions without success.
 
Upvote 0

Forum statistics

Threads
1,224,734
Messages
6,180,630
Members
452,991
Latest member
JM_000888

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