Return cell value if date is between two dates

Lforeman

New Member
Joined
Mar 18, 2019
Messages
2
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Job Number
[/TD]
[TD]Date
[/TD]
[TD]Amount
[/TD]
[TD]Week 1
[/TD]
[TD]Week 2
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]02/03/2019
[/TD]
[TD]09/03/2019
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]08/03/2019
[/TD]
[TD]15/03/2019

[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]201
[/TD]
[TD]05/03/2019
[/TD]
[TD]3182.20
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]201
[/TD]
[TD]05/03/2019
[/TD]
[TD]2137.80
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]201
[/TD]
[TD]07/03/2019
[/TD]
[TD]4349.80
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]201
[/TD]
[TD]08/03/2019
[/TD]
[TD]2362.80

[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]201
[/TD]
[TD]11/03/2019
[/TD]
[TD]2623.60
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

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

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
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,223,908
Messages
6,175,306
Members
452,633
Latest member
DougMo

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