SUMIF between time range Monday to Friday.

Yamezz

Active Member
Joined
Nov 22, 2006
Messages
364
Office Version
  1. 2019
I have the output of my solar inverter giving me column A with the date and time of the measurement and column B with the solar system production in kWh.
I would like to use a function to get the kWh during the period 7am-9pm Monday to Friday.

I guess I need the correct syntax for this:
SUMIF(A1:A1000,{between 7am and 9pm Monday to Friday},B1:B1000)

Any help is much appreciated.
Thanks guys.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
How is the value in Column A formatted?

Is it a number or is it text?

Can you please provide an example of it?
 
Upvote 0
The cell shows 16/02/2018 0:45
but when selected, the formula bar shows 16/02/2018 12:45:00 AM
The cell format shows d/mm/yyyy h:mm

Thanks.
 
Upvote 0
Try a sumproduct:

=SUMPRODUCT(--(WEEKDAY($A$1:$A$100,2)<6),--(MOD($A$1:$A$100,1)>=7/24),--(MOD($A$1:$A$100,1)<=21/24),$B$1:$B$100)
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,241
Members
452,622
Latest member
Laura_PinksBTHFT

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