Array formula

Pefird

New Member
Joined
Mar 15, 2019
Messages
5
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[TD]H
[/TD]
[TD]I
[/TD]
[TD]J
[/TD]
[TD]K
[/TD]
[TD]L
[/TD]
[TD]M
[/TD]
[/TR]
[TR]
[TD]Date
[/TD]
[TD]Route
[/TD]
[TD]Product 1
[/TD]
[TD]Product 2
[/TD]
[TD]Product 3
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]MAY
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]May 1
[/TD]
[TD]3
[/TD]
[TD]23
[/TD]
[TD]32
[/TD]
[TD]29
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Route
[/TD]
[TD]P1
[/TD]
[TD]P2
[/TD]
[TD]P3
[/TD]
[/TR]
[TR]
[TD]May 2
[/TD]
[TD]5
[/TD]
[TD]35
[/TD]
[TD]53
[/TD]
[TD]71
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]3
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]May 3
[/TD]
[TD]6
[/TD]
[TD]14
[/TD]
[TD]27
[/TD]
[TD]12
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]4
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]May 4
[/TD]
[TD]5
[/TD]
[TD]18
[/TD]
[TD]81
[/TD]
[TD]65
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]5
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]April 30
[/TD]
[TD]3
[/TD]
[TD]54
[/TD]
[TD]19
[/TD]
[TD]21
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]6
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Cant get this figured out, hope its even possible.

I want to total routes by the month. So see if I can explain this well enough.
I have a daily worksheet I fill out with date, route and products used on individual routes.

In another worksheet, I would like to keep a record of the amount of product used per month for each route.
I have been trying to use =Sumifs to compare the Month() in Column A to the Month() in J1 and while also comparing the Column B to the individual cell routes in Column J. Summing C,D,E into K,L,M respectively.

This doesn't match the table above, but...
{=sumifs('[Activity.xlsx]Night'!$J:$J,month('[Activity.xlsx]Night'!$B:$b),"="&month($B$1),'[Activity.xlsx]Night'!$c:$C,"="&$B4)}

This is my attempt...but Excel says that it isn't even a formula. Obviously doing something very wrong.

Thanks for your help!


 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Re: Help with an array formula

How about

Excel 2013/2016
ABCDEFGHIJKLM
1DateRouteProduct 1Product 2Product 301/05/2019
2May-013233229RouteP1P2P3
3May-0253553713233229
4May-0361427124000
5May-045188165553134136
6Apr-3035419216142712
Names
Cell Formulas
RangeFormula
K3=SUMPRODUCT((MONTH($A$2:$A$6)=MONTH($J$1))*($B$2:$B$6=$J3),C$2:C$6)
 
Upvote 0
Re: Help with an array formula

I put a helper column F that was: =MONTH(A2) and fill down.
In J1, I put 5/1 so that the actual entry is a serial number, then a helper in K1: =month(J1)



Then, K3 looks like the image and filled down and across.

Clip0013.jpg


You could move the J - M to another sheet and change the formula accordingly using the sheet names.
 
Upvote 0
Re: Help with an array formula

Thanks to all the options. The sumproduct worked well. I was overthinking it. Thank you for reminding me of the sumproduct, I've used it before but didn't think of it at all.
 
Upvote 0
Re: Help with an array formula

Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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