Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8972259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:10:30+00:00 2026-06-15T18:10:30+00:00

I want to set values based on a arrival and departure date: Idx Arrive

  • 0

I want to set values based on a arrival and departure date:

Idx    Arrive    Depart    01. Jan    02. Jan    03. Jan    04. Jan    05. Jan    ...
 1     01. Jan   04. Jan      1          1          1
 2     02. Jan   04. Jan                 1          1
 3     02. Jan   05. Jan                 1          1          1          
 4     01. Jan   05. Jan      1          1          1          1          
 5     03. Jan   05. Jan                            1          1
...    ...       ...         ...        ...        ...        ...        ...      ...

                 Total        2          4          5          3

For example, Idx 1:

Arrives on 01 January
Departs on 04 January
A total of 3 nights accommodation needed (value of ‘1’ in the columns 01, 02 and 03 January) You’ll note that a ‘1’ isn’t entered in the 04 January column, as this is the date of departure and no accommodation isn’t required that night.

How to archieve this in Excel?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:10:31+00:00Added an answer on June 15, 2026 at 6:10 pm

    Assuming that Arrive is in column A and the column headers (Arrive, Depart, 01. Jan) are on row 1, you want to put the following formula into cell C2:

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

    From there, you can copy the formula into the other cells. The formula assumes that the dates on the left and at the top are proper data values, i.e. Excel treats them as dates.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In SessionListener I want to set some values of @ManagedBean with Session scope that
I want to return a set of values from function till the point they
I want to create a line chart using 2 set of values.First value (i.e
I am pulling varchar values out of a DB and want to set the
I am trying to store a set of values in delphi, but i want
I want to get all values of a set interface in one go as
I want to be able to set variables in a template to string values.
I use a VB6/COM+ application which outputs date/time values based on the short date
I am developing an app where i need to set spinner values dynamically based
Possible Duplicate: Based on date, get todays and the next two days values from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.