SUMPRODUCT with Year/Month and Tables

SimonVOwen

New Member
Joined
Nov 15, 2017
Messages
26
Hello All,

I have a dataset that runs from 01-11-16 to 31-03-18 from D4:D519. One Row for each day of the year.
I also have a table of data which has each day broken down into 48 Half Hour periods per day.
I am trying to find out in each month what the total cost is in these half hour periods.

So far I have tried the below code
=SUMPRODUCT(MONTH(D4:D519)=4)*(YEAR(D4:D519)=2017)*(T4:BO519)
or
=SUMPRODUCT(MONTH(D4:D519)=4)*(YEAR(D4:D519)=2017)*(PC1HH)
Which is the name of the table I am looking at, as I have several different tables I would prefer the code to work with just changing the table.
Both currently return #Value .

Can provide example data if required but would need manipulate.


Regards,

Simon Owen
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,215,696
Messages
6,126,267
Members
449,308
Latest member
VerifiedBleachersAttendee

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