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
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