Conditional Sum with Many cri by formula or VBA

MyExcel

Well-known Member
Joined
Sep 25, 2008
Messages
508
hi guru
i have this data
and this data grow day by data, my Real data more than 15000 row
Excel 2012
ABCDEFGHIJKLMNOPQRS
TruckTypeMonthTruckType
Truck 3FlTruck 3Fl
Truck 1InDirTruck 1S Typ
Truck 5FlTruck 5InDir
Truck 4Fl
Truck 3S Typ
Truck 2InDir
Truck 2Fl
Truck 4Dir
Truck 2InDir
Truck 4InDir
Truck 8InDir
Truck 4Dir
Truck 1Fl
Truck 1Dir
Truck 2Dir
Truck 1Dir
Truck 3Dir
Truck 3InDir
Truck 4InDir
Truck 3Dir
Truck 2Fl

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"]01/Jan/2013[/TD]
[TD="align: right"]01/Feb/2013[/TD]
[TD="align: right"]01/Mar/2013[/TD]
[TD="align: right"]01/Apr/2013[/TD]
[TD="align: right"]01/May/2013[/TD]
[TD="align: right"]01/Jun/2013[/TD]
[TD="align: right"]01/Jul/2013[/TD]
[TD="align: right"]01/Aug/2013[/TD]
[TD="align: right"]01/Sep/2013[/TD]
[TD="align: right"]01/Oct/2013[/TD]
[TD="align: right"]01/Nov/2013[/TD]
[TD="align: right"]01/Dec/2013[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]2[/TD]

[TD="align: right"] 202 [/TD]
[TD="align: right"] 886 [/TD]
[TD="align: right"] 315 [/TD]
[TD="align: right"] 399 [/TD]
[TD="align: right"] 157 [/TD]
[TD="align: right"] 380 [/TD]
[TD="align: right"] 593 [/TD]
[TD="align: right"] 271 [/TD]
[TD="align: right"] 720 [/TD]
[TD="align: right"] 482 [/TD]
[TD="align: right"] 227 [/TD]
[TD="align: right"] 961 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"]5[/TD]

[TD="align: center"]3[/TD]

[TD="align: right"] 218 [/TD]
[TD="align: right"] 803 [/TD]
[TD="align: right"] 228 [/TD]
[TD="align: right"] 603 [/TD]
[TD="align: right"] 670 [/TD]
[TD="align: right"] 374 [/TD]
[TD="align: right"] 956 [/TD]
[TD="align: right"] 495 [/TD]
[TD="align: right"] 113 [/TD]
[TD="align: right"] 581 [/TD]
[TD="align: right"] 571 [/TD]
[TD="align: right"] 596 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]4[/TD]

[TD="align: right"] 247 [/TD]
[TD="align: right"] 763 [/TD]
[TD="align: right"] 932 [/TD]
[TD="align: right"] 321 [/TD]
[TD="align: right"] 837 [/TD]
[TD="align: right"] 962 [/TD]
[TD="align: right"] 469 [/TD]
[TD="align: right"] 822 [/TD]
[TD="align: right"] 939 [/TD]
[TD="align: right"] 275 [/TD]
[TD="align: right"] 496 [/TD]
[TD="align: right"] 734 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]5[/TD]

[TD="align: right"] 269 [/TD]
[TD="align: right"] 373 [/TD]
[TD="align: right"] 846 [/TD]
[TD="align: right"] 325 [/TD]
[TD="align: right"] 972 [/TD]
[TD="align: right"] 232 [/TD]
[TD="align: right"] 736 [/TD]
[TD="align: right"] 490 [/TD]
[TD="align: right"] 914 [/TD]
[TD="align: right"] 979 [/TD]
[TD="align: right"] 969 [/TD]
[TD="align: right"] 537 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]6[/TD]

[TD="align: right"] 321 [/TD]
[TD="align: right"] 389 [/TD]
[TD="align: right"] 261 [/TD]
[TD="align: right"] 460 [/TD]
[TD="align: right"] 450 [/TD]
[TD="align: right"] 331 [/TD]
[TD="align: right"] 202 [/TD]
[TD="align: right"] 420 [/TD]
[TD="align: right"] 690 [/TD]
[TD="align: right"] 486 [/TD]
[TD="align: right"] 269 [/TD]
[TD="align: right"] 440 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]7[/TD]

[TD="align: right"] 328 [/TD]
[TD="align: right"] 274 [/TD]
[TD="align: right"] 747 [/TD]
[TD="align: right"] 375 [/TD]
[TD="align: right"] 410 [/TD]
[TD="align: right"] 191 [/TD]
[TD="align: right"] 516 [/TD]
[TD="align: right"] 528 [/TD]
[TD="align: right"] 919 [/TD]
[TD="align: right"] 536 [/TD]
[TD="align: right"] 347 [/TD]
[TD="align: right"] 734 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]8[/TD]

[TD="align: right"] 345 [/TD]
[TD="align: right"] 764 [/TD]
[TD="align: right"] 678 [/TD]
[TD="align: right"] 557 [/TD]
[TD="align: right"] 928 [/TD]
[TD="align: right"] 920 [/TD]
[TD="align: right"] 821 [/TD]
[TD="align: right"] 296 [/TD]
[TD="align: right"] 181 [/TD]
[TD="align: right"] 578 [/TD]
[TD="align: right"] 954 [/TD]
[TD="align: right"] 938 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]9[/TD]

[TD="align: right"] 363 [/TD]
[TD="align: right"] 216 [/TD]
[TD="align: right"] 449 [/TD]
[TD="align: right"] 645 [/TD]
[TD="align: right"] 890 [/TD]
[TD="align: right"] 628 [/TD]
[TD="align: right"] 778 [/TD]
[TD="align: right"] 141 [/TD]
[TD="align: right"] 432 [/TD]
[TD="align: right"] 850 [/TD]
[TD="align: right"] 199 [/TD]
[TD="align: right"] 364 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]10[/TD]

[TD="align: right"] 387 [/TD]
[TD="align: right"] 327 [/TD]
[TD="align: right"] 444 [/TD]
[TD="align: right"] 657 [/TD]
[TD="align: right"] 287 [/TD]
[TD="align: right"] 680 [/TD]
[TD="align: right"] 512 [/TD]
[TD="align: right"] 976 [/TD]
[TD="align: right"] 723 [/TD]
[TD="align: right"] 232 [/TD]
[TD="align: right"] 794 [/TD]
[TD="align: right"] 759 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]11[/TD]

[TD="align: right"] 398 [/TD]
[TD="align: right"] 826 [/TD]
[TD="align: right"] 854 [/TD]
[TD="align: right"] 876 [/TD]
[TD="align: right"] 322 [/TD]
[TD="align: right"] 496 [/TD]
[TD="align: right"] 661 [/TD]
[TD="align: right"] 966 [/TD]
[TD="align: right"] 467 [/TD]
[TD="align: right"] 275 [/TD]
[TD="align: right"] 673 [/TD]
[TD="align: right"] 586 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]12[/TD]

[TD="align: right"] 501 [/TD]
[TD="align: right"] 186 [/TD]
[TD="align: right"] 501 [/TD]
[TD="align: right"] 881 [/TD]
[TD="align: right"] 748 [/TD]
[TD="align: right"] 634 [/TD]
[TD="align: right"] 919 [/TD]
[TD="align: right"] 945 [/TD]
[TD="align: right"] 397 [/TD]
[TD="align: right"] 740 [/TD]
[TD="align: right"] 748 [/TD]
[TD="align: right"] 826 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]13[/TD]

[TD="align: right"] 505 [/TD]
[TD="align: right"] 254 [/TD]
[TD="align: right"] 467 [/TD]
[TD="align: right"] 470 [/TD]
[TD="align: right"] 837 [/TD]
[TD="align: right"] 402 [/TD]
[TD="align: right"] 126 [/TD]
[TD="align: right"] 905 [/TD]
[TD="align: right"] 760 [/TD]
[TD="align: right"] 196 [/TD]
[TD="align: right"] 997 [/TD]
[TD="align: right"] 616 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]14[/TD]

[TD="align: right"] 510 [/TD]
[TD="align: right"] 215 [/TD]
[TD="align: right"] 953 [/TD]
[TD="align: right"] 297 [/TD]
[TD="align: right"] 584 [/TD]
[TD="align: right"] 557 [/TD]
[TD="align: right"] 146 [/TD]
[TD="align: right"] 191 [/TD]
[TD="align: right"] 350 [/TD]
[TD="align: right"] 819 [/TD]
[TD="align: right"] 274 [/TD]
[TD="align: right"] 887 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]15[/TD]

[TD="align: right"] 568 [/TD]
[TD="align: right"] 464 [/TD]
[TD="align: right"] 586 [/TD]
[TD="align: right"] 231 [/TD]
[TD="align: right"] 746 [/TD]
[TD="align: right"] 966 [/TD]
[TD="align: right"] 957 [/TD]
[TD="align: right"] 718 [/TD]
[TD="align: right"] 491 [/TD]
[TD="align: right"] 196 [/TD]
[TD="align: right"] 494 [/TD]
[TD="align: right"] 639 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]16[/TD]

[TD="align: right"] 638 [/TD]
[TD="align: right"] 965 [/TD]
[TD="align: right"] 157 [/TD]
[TD="align: right"] 652 [/TD]
[TD="align: right"] 277 [/TD]
[TD="align: right"] 864 [/TD]
[TD="align: right"] 849 [/TD]
[TD="align: right"] 342 [/TD]
[TD="align: right"] 842 [/TD]
[TD="align: right"] 291 [/TD]
[TD="align: right"] 372 [/TD]
[TD="align: right"] 467 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]17[/TD]

[TD="align: right"] 648 [/TD]
[TD="align: right"] 584 [/TD]
[TD="align: right"] 234 [/TD]
[TD="align: right"] 989 [/TD]
[TD="align: right"] 340 [/TD]
[TD="align: right"] 506 [/TD]
[TD="align: right"] 403 [/TD]
[TD="align: right"] 839 [/TD]
[TD="align: right"] 238 [/TD]
[TD="align: right"] 347 [/TD]
[TD="align: right"] 765 [/TD]
[TD="align: right"] 460 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]18[/TD]

[TD="align: right"] 693 [/TD]
[TD="align: right"] 663 [/TD]
[TD="align: right"] 998 [/TD]
[TD="align: right"] 531 [/TD]
[TD="align: right"] 810 [/TD]
[TD="align: right"] 142 [/TD]
[TD="align: right"] 951 [/TD]
[TD="align: right"] 576 [/TD]
[TD="align: right"] 140 [/TD]
[TD="align: right"] 410 [/TD]
[TD="align: right"] 796 [/TD]
[TD="align: right"] 879 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]19[/TD]

[TD="align: right"] 753 [/TD]
[TD="align: right"] 336 [/TD]
[TD="align: right"] 277 [/TD]
[TD="align: right"] 452 [/TD]
[TD="align: right"] 201 [/TD]
[TD="align: right"] 245 [/TD]
[TD="align: right"] 951 [/TD]
[TD="align: right"] 547 [/TD]
[TD="align: right"] 694 [/TD]
[TD="align: right"] 890 [/TD]
[TD="align: right"] 385 [/TD]
[TD="align: right"] 557 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]20[/TD]

[TD="align: right"] 759 [/TD]
[TD="align: right"] 602 [/TD]
[TD="align: right"] 234 [/TD]
[TD="align: right"] 258 [/TD]
[TD="align: right"] 676 [/TD]
[TD="align: right"] 840 [/TD]
[TD="align: right"] 426 [/TD]
[TD="align: right"] 947 [/TD]
[TD="align: right"] 311 [/TD]
[TD="align: right"] 232 [/TD]
[TD="align: right"] 466 [/TD]
[TD="align: right"] 492 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]21[/TD]

[TD="align: right"] 816 [/TD]
[TD="align: right"] 461 [/TD]
[TD="align: right"] 139 [/TD]
[TD="align: right"] 232 [/TD]
[TD="align: right"] 463 [/TD]
[TD="align: right"] 532 [/TD]
[TD="align: right"] 958 [/TD]
[TD="align: right"] 104 [/TD]
[TD="align: right"] 996 [/TD]
[TD="align: right"] 753 [/TD]
[TD="align: right"] 290 [/TD]
[TD="align: right"] 771 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]22[/TD]

[TD="align: right"] 884 [/TD]
[TD="align: right"] 984 [/TD]
[TD="align: right"] 447 [/TD]
[TD="align: right"] 740 [/TD]
[TD="align: right"] 279 [/TD]
[TD="align: right"] 652 [/TD]
[TD="align: right"] 573 [/TD]
[TD="align: right"] 422 [/TD]
[TD="align: right"] 344 [/TD]
[TD="align: right"] 266 [/TD]
[TD="align: right"] 806 [/TD]
[TD="align: right"] 333 [/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>
Sheet1






i want to sum the Value Cri in range Q1:S4
month = 5
Truck = Truck 3 or Truck 1 or Truck 5
Type = Fl or S Type or InDir

can Excel Formula Solve it
if not
any Suggestion for good Code to fast and accurte

thank you in advanced
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi there

That's the perfect case for the DSUM formula! Check it out please :-)
 
Upvote 0
????
could any one please solve it by formula or VBA

i want VBA it will be better for me
 
Upvote 0
MyExcel,

Did you spend 5 minutes in the help files looking at the DSUM and its syntax / required arguments?
I don't think so. You already replied 20 minutes after my suggestion.
With almost 500 posts at MrExcel, you should be able to get a higher standard of posting etiquette.

I prefer to donate my time and knowledge to other users.
 
Upvote 0
MyExcel,

Did you spend 5 minutes in the help files looking at the DSUM and its syntax / required arguments?
I don't think so. You already replied 20 minutes after my suggestion.
With almost 500 posts at MrExcel, you should be able to get a higher standard of posting etiquette.

I prefer to donate my time and knowledge to other users.

hi wigi
i tried but i can't
 
Upvote 0

Forum statistics

Threads
1,223,605
Messages
6,173,321
Members
452,510
Latest member
RCan29

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