+ Reply to Thread
Results 1 to 10 of 10

I need help creating a formula that shows Arrival and Departure dates based on data set

  1. #1
    Registered User
    Join Date
    03-27-2024
    Location
    Dallas, Texas
    MS-Off Ver
    Excel in Office 365 fo enterprise
    Posts
    3

    Exclamation I need help creating a formula that shows Arrival and Departure dates based on data set

    I run into spreadsheets that look like the attached frequently. I am looking for a solution that will provide me with the Arrival date and Departure date without wanting to cry.

    The user adds the information by placing a 1 or an x sometimes in the column under the date a guest is staying.

    The first column with a value is their arrival date.
    The first column with no value is their departure date.

    In the case of a value in column C, the departure date would be the following date 4/28.

    So for row 2 of the attached, Arrival date is 4/25 and departure date is 4/28.
    Row 7 would be Arrival 4/25 and departure 4/26.

    Is there a way to make this happen? It can be with formulas or macros or whatever. This is just so time consuming.

    Arrival Departure date Example workbook.xlsx

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,139

    Re: I need help creating a formula that shows Arrival and Departure dates based on data se

    can you add WHAT you expect to see WHERE you expect to see it for two rows, so we can understand exactly what you want.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,426

    Re: I need help creating a formula that shows Arrival and Departure dates based on data se

    Change the headers to real dates and try this:

    =MAXIFS($A$1:$C$1,A2:C2,"<>")-MINIFS($A$1:$C$1,A2:C2,"<>")+1

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    A
    B
    C
    D
    E
    1
    25/04/2024
    26/04/2024
    27/04/2024
    Total
    2
    1
    1
    1
    3
    3
    1
    1
    1
    3
    4
    1
    1
    1
    3
    5
    1
    1
    2
    6
    1
    1
    1
    3
    7
    1
    1
    8
    1
    1
    1
    3
    9
    1
    1
    1
    3
    10
    1
    1
    2
    11
    1
    1
    2
    12
    1
    1
    2
    13
    1
    1
    1
    3
    14
    1
    1
    1
    3
    15
    1
    1
    16
    1
    1
    17
    1
    1
    1
    3
    18
    1
    1
    1
    3
    19
    1
    1
    1
    3
    20
    1
    1
    Sheet: Sheet2
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    03-27-2024
    Location
    Dallas, Texas
    MS-Off Ver
    Excel in Office 365 fo enterprise
    Posts
    3

    Re: I need help creating a formula that shows Arrival and Departure dates based on data se

    Yes! Sorry, first time posting here.

    I'm looking for something like what is on this attachment. Just two new columns, one for arrival date and one for departure date.

    Arrival Departure date Example workbook2.xlsx

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,426

    Re: I need help creating a formula that shows Arrival and Departure dates based on data se

    Or maybe:

    =MINIFS($A$1:$C$1,A2:C2,"<>")

    =MAXIFS($A$1:$C$1,A2:C2,"<>")

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    A
    B
    C
    D
    E
    F
    G
    1
    25/04/2024
    26/04/2024
    27/04/2024
    Total
    Arrive
    Depart
    2
    1
    1
    1
    3
    25/04/2024
    27/04/2024
    3
    1
    1
    1
    3
    25/04/2024
    27/04/2024
    4
    1
    1
    1
    3
    25/04/2024
    27/04/2024
    5
    1
    1
    2
    25/04/2024
    26/04/2024
    6
    1
    1
    1
    3
    25/04/2024
    27/04/2024
    7
    1
    1
    25/04/2024
    25/04/2024
    8
    1
    1
    1
    3
    25/04/2024
    27/04/2024
    9
    1
    1
    1
    3
    25/04/2024
    27/04/2024
    10
    1
    1
    2
    25/04/2024
    26/04/2024
    11
    1
    1
    2
    25/04/2024
    26/04/2024
    12
    1
    1
    2
    25/04/2024
    26/04/2024
    13
    1
    1
    1
    3
    25/04/2024
    27/04/2024
    14
    1
    1
    1
    3
    25/04/2024
    27/04/2024
    15
    1
    1
    25/04/2024
    25/04/2024
    16
    1
    1
    25/04/2024
    25/04/2024
    17
    1
    1
    1
    3
    25/04/2024
    27/04/2024
    18
    1
    1
    1
    3
    25/04/2024
    27/04/2024
    19
    1
    1
    1
    3
    25/04/2024
    27/04/2024
    20
    1
    1
    25/04/2024
    25/04/2024
    Sheet: Sheet2

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,139

    Re: I need help creating a formula that shows Arrival and Departure dates based on data se

    It'll probably be:

    =MAXIFS($A$1:$C$1,A2:C2,"<>")+1

    for departure date.

  7. #7
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: I need help creating a formula that shows Arrival and Departure dates based on data se

    Please enter real dates in row 1 (no text) and

    for arrival date try in F2 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and for departure date try in G2 and copy down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    03-27-2024
    Location
    Dallas, Texas
    MS-Off Ver
    Excel in Office 365 fo enterprise
    Posts
    3

    Re: I need help creating a formula that shows Arrival and Departure dates based on data se

    You guys are amazing! These worked perfectly!
    My team says thank you for saving them so much time! I appreciate the very fast replies!!

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,426

    Re: I need help creating a formula that shows Arrival and Departure dates based on data se

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  10. #10
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,465

    Re: I need help creating a formula that shows Arrival and Departure dates based on data se

    You are Welcome!

    Thanks for the feedback and rep. .

    Glad to have helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Calculate time of arrival with IF condition based on departure
    By Havreliuc in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 05-25-2022, 11:07 AM
  2. [SOLVED] Auto populate dates with color according to arrival & departure
    By andsalex in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2021, 01:23 AM
  3. [SOLVED] Sorting Arrival and departure times
    By sa1ntj0hn in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 05-22-2019, 05:35 AM
  4. Replies: 2
    Last Post: 05-30-2013, 12:45 PM
  5. [SOLVED] Formula to count number of nights falling in each month from arrival and departure dates
    By zicitron in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-28-2013, 02:16 AM
  6. Replies: 0
    Last Post: 04-10-2013, 09:39 AM
  7. [SOLVED] Calculating the number of people in building based on arrival and departure times
    By dvs in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-01-2012, 09:45 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1