+ Reply to Thread
Results 1 to 4 of 4

Help with a formula to calculate nights between two dates

  1. #1
    Registered User
    Join Date
    02-16-2021
    Location
    Lincolnshire, England
    MS-Off Ver
    Microsoft Office Home and Student 2019
    Posts
    2

    Help with a formula to calculate nights between two dates

    Hi I am semi new to using excel and I am trying to create a spread sheet for work. It looks at the amount of days an animal stays with a fosterer on a monthly spreadsheet.

    I understand the formula of =INT(G56)-INT(F56) however what i'm struggling with is if the animal hasnt left yet. Is there a way that if f56 is blank it will uses the last day of the month instead to work out the number of days?

    dates.png

    I have no idea if this is something that can be done.
    I hope this makes sense, Thank you for your help.

    Sarah

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Help with a formula to calculate nights between two dates

    I'm assuming that was a typo when you said if F56 is blank you meant if G56 is blank, since G56 is presumably a later date than F56.

    If that's so then

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    02-16-2021
    Location
    Lincolnshire, England
    MS-Off Ver
    Microsoft Office Home and Student 2019
    Posts
    2

    Re: Help with a formula to calculate nights between two dates

    This is perfect. Thank you so much

  4. #4
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Help with a formula to calculate nights between two dates

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon 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 those who helped.
    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.

+ 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. how to calculate the count of the nights excluding dates
    By Thijmen123 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 12-16-2019, 07:01 PM
  2. How many room nights per day in between a list of dates
    By stabujara in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-06-2018, 10:55 PM
  3. Calculate Monthly Nights On excel 2010
    By Baltyngumu in forum Excel General
    Replies: 1
    Last Post: 11-27-2013, 05:14 AM
  4. [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
  5. Replies: 0
    Last Post: 04-10-2013, 09:39 AM
  6. link arrival and depature dates to the number of nights
    By angelviewxx in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-10-2013, 09:14 AM
  7. Calculating Weeks, Weekday nights and Weekend nights
    By bngguy in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 10-26-2010, 01:41 PM

Tags for this Thread

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