Formula help: multiple sheets, Date range criteria, sum if less than 0

joegalea13

New Member
Joined
Nov 13, 2017
Messages
2
Hi, this is my first post, thank you in advance for any help you can give.

I have a spreadsheet with multiple sheets (1 per student)

Each student has the following 2 identical columns on their sheet

Column D = Time added or time minus (added is when they buy, minus is when they use)

Column B = date of lesson

I want to be able to sum column D if the value in column D is less than 0 (to extract lesson taken) only if that lessons was used between 2 dates. Ideally I place those 2 dates in another field to reference rather than hard code so i can make the change in 1 spot for all students.

Thanks,
Joe
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Code:
=sumifs(D:D,D:D,"<=0",B:B,"<="&[cell with later date],B:B,">="&[cell with earlier date])

Try the above formula. Note there are no length parameters on the ranges. Also, the references to the dates will include the two dates. If you want the date range to be between the dates use ">" instead of ">=" and vice versa.
 
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,274
Members
452,628
Latest member
dd2

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