Date Range Between Start Date and End Date in Excel

I'm sticking with data do you know the formula for the below question.

enter image description here

enter image description here

The result should be 1 if the date is between the start date and the end date.

Upvotes: 1

Views: 891

Answers (2)

Mayukh Bhattacharya
Mayukh Bhattacharya

Reputation: 27233

You may try in this way as well, BOOLEAN LOGIC

Formula used in cell E2

=(E$1>=$A2)*(E$1<=$B2)

And Fill Down & Fill Across

And set the formatting as --> Select the ranges, press CTRL 1 --> Format Cells --> Number Tab --> Custom --> Type --> 0;;

Note On BOOLEAN LOGIC :

• A Boolean is a data type with only two possible values, TRUE or FALSE.

Boolean values is that they have numeric equivalents that can be used in formulas.

• During a math operation, Excel will coerce Booleans into numbers, TRUE becomes "1", and FALSE becomes "0".

No Nesting. No IF statements. Excel simply runs the calculation and returns the result. That's the gist of Boolean logic.

BOOLEAN_LOGIC

Upvotes: 1

VBasic2008
VBasic2008

Reputation: 54777

IF Statement And Locking References

In cell E2 use:

=IF(AND(E$1>=$A2,E$1<=$B2),1,"")

Upvotes: 1

Related Questions