Excel Formula - Change Response from False to 0

Anonymous
2022-07-20T12:43:10+00:00

Hello,

I have an Excel Formula i am really struggling to work with. I have a large Excel Spreadsheet containing a hotel rooming list. I need to be able to add a Check In and Checkout Date and then using the formula below, ask Excel to read if that check in date and then checkout date exists and then add a 1. As you can see from the screenshot, the 1's will sum down the sheet and then total in the 'Allocated' area in Row B.

I have the formula working perfectly to return a 1, however rather than False, I need Excel to return 0. I have tried to extend my formula however this will not work.

=IF(AND($D10 <=$F$9, $E10 >$F$9), 1)

Is anybody able to assist with this? Unfortunately the user of this sheet must have a 0 (or a blank cell if easier) rather than False returning.

Microsoft 365 and Office | Excel | Other | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2022-07-20T12:51:34+00:00

    Re: formula

    Try...

    =IF(AND($D10 <=$F$9, $E10 >$F$9), 1, 0)

    '---
    Nothing Left to Lose

    https://1drv.ms/u/s!Au8Lyt79SOuhZw2MCH7_7MuLj04?e=sAwbHU

    (free excel programs)

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2022-07-20T14:15:13+00:00

    Try:

    =--AND($D10 <=$F$9, $E10 >$F$9)

    2 people found this answer helpful.
    0 comments No comments