Project falls between 2 dates

1excel1

New Member
Joined
Oct 4, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi, I need some help with a date formula. I need the formula to output a '1' if the project falls within Start Date and End Date. If there's no date, then it should be Today's date.

Kind regards,
 

Attachments

  • Untitled.png
    Untitled.png
    9 KB · Views: 5

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Welcome to the MrExcel board!

Different Excel versions have different functions & features available to them. By choosing "Prefer Not To Say" for your version you are stopping us knowing which functions/features are available to you and therefore it is difficult for us to know what to suggest. Perhaps you could reconsider that option in your profile?


Also, it is much easier for helpers to test what might be best for your data if they can actually copy that data to their own worksheets.
MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Book1
ABCDEFGHIJKLMNOPQR
1Project IDStart DateEnd DateAug-23Sep-23Oct-23Nov-23Dec-23Jan-24Feb-24Mar-24Apr-24May-24Jun-24Jul-24Aug-24Sep-24Oct-24
2A02/10/2021
3B03/10/2023
4C21/09/2024
5D17/07/202401/08/2024
Sheet1
 
Upvote 0
Thanks for updating your profile and for the XL2BB sample data. (y)

See if this could work for you.

24 10 07.xlsm
ABCDEFGHIJKLMNOPQR
1Project IDStart DateEnd DateAug-23Sep-23Oct-23Nov-23Dec-23Jan-24Feb-24Mar-24Apr-24May-24Jun-24Jul-24Aug-24Sep-24Oct-24
2A2/10/2021111111111111111
3B3/10/2023  1111111111111
4C21/09/2024             11
5D17/07/20241/08/2024           11  
1excel1
Cell Formulas
RangeFormula
D2:R5D2=IF(AND(D$1>=$B2-DAY($B2)+1,D$1<=IF($C2="",TODAY(),$C2)),1,"")
 
Upvote 0
Solution
Thanks for updating your profile and for the XL2BB sample data. (y)

See if this could work for you.

24 10 07.xlsm
ABCDEFGHIJKLMNOPQR
1Project IDStart DateEnd DateAug-23Sep-23Oct-23Nov-23Dec-23Jan-24Feb-24Mar-24Apr-24May-24Jun-24Jul-24Aug-24Sep-24Oct-24
2A2/10/2021111111111111111
3B3/10/2023  1111111111111
4C21/09/2024             11
5D17/07/20241/08/2024           11  
1excel1
Cell Formulas
RangeFormula
D2:R5D2=IF(AND(D$1>=$B2-DAY($B2)+1,D$1<=IF($C2="",TODAY(),$C2)),1,"")
Many thanks for this. It works!
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,619
Latest member
Shiv1198

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