+ Reply to Thread
Results 1 to 4 of 4

Formula to calulate out how many nights in month of december were used.

  1. #1
    Registered User
    Join Date
    12-28-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Formula to calulate out how many nights in month of december were used.

    I'm trying to figure out a formula or if statement to determine how many nights in the month of december were used.

    Ex: Arriving 12/15/12 to Departing 1/5/12 = 17 nights (calculating Dec 15 to Dec 31)
    Ex: Arriving 11/20/12 to Departing 12/5/12 = 4 nights (calculating Dec 1, 2, 3, and 4)

    Any help would be awesome.

    Thanks!
    Last edited by bradleeG; 12-28-2012 at 02:37 PM.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Formula to calulate out how many nights in month of december were used.

    Hi BradleeG,

    Welcome to the forum..

    see the attached file where I have transferred your scenario and tried a formula solution. thanks.

    nights calculation.xlsx

    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    12-28-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Formula to calulate out how many nights in month of december were used.

    Almost there... seems to be calculating incorrectly if range is within same month...
    W/E 12/2/2012 12/3/2012 30
    FH-PT 12/2/2012 12/3/2012 30
    MOTEL 12/3/2012 12/4/2012 29

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Formula to calulate out how many nights in month of december were used.

    Oopps... thanks for the heads up.. revised and shorten the formula now..

    nights calculation.xlsx

    Regards,
    DILIPandey
    <click on below * if this helps>

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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