Return cell value if date is between two dates

Lforeman

New Member
Joined
Mar 18, 2019
Messages
2
A
B
C
D
E
1
Job Number
Date
Amount
Week 1
Week 2
2
02/03/2019
09/03/2019
3
08/03/2019
15/03/2019

4
201
05/03/2019
3182.20
5
201
05/03/2019
2137.80
6
201
07/03/2019
4349.80
7
201
08/03/2019
2362.80

8
201
11/03/2019
2623.60

<tbody>
</tbody>

I need help please in determining the correct formula for returning a value if date is between two date.

The above data is an example of what I am working with.

In cell D4, I want to show the value of C4 if B4 falls within (and including) the date range of week 1 (D2 and D3).

All attempts have resulted in a false result.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi Lforeman,

If you want sum between dates & per Job number maybe you could use this?


Book1
ABCDEFG
1Job NumberDateAmountJob NumberWeek 1Week 2
2Transactions02-03-1909-03-19
308-03-1915-03-19
420105-03-19$3,182.20201$12,032.60$2,623.60
520105-03-19$2,137.80
620107-03-19$4,349.80
720108-03-19$2,362.80
820111-03-19$2,623.60
Sheet1
Cell Formulas
RangeFormula
F4=SUMIFS($C$4:$C$8,$B$4:$B$8,">="&F$2,$B$4:$B$8,"<="&F$3,$A$4:$A$8,$E4)
G4=SUMIFS($C$4:$C$8,$B$4:$B$8,">="&G$2,$B$4:$B$8,"<="&G$3,$A$4:$A$8,$E4)
 
Last edited:
Upvote 0
maybe:
Code:
D4: =IF(AND($B4>=D$2,$B4<=D$3),$C4,0)
 
Last edited:
Upvote 0
Thank you for your responses.

I have worked out that it is a report formatting problem not a formula problem. Sandy666 your formula worked, thank you.
 
Upvote 0

Forum statistics

Threads
1,214,601
Messages
6,120,465
Members
448,965
Latest member
grijken

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