+ Reply to Thread
Results 1 to 5 of 5

IF/And Nestled function relating to DATE

  1. #1
    Registered User
    Join Date
    05-23-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    46

    IF/And Nestled function relating to DATE

    Hi,

    I need assistance with the IF/And function

    B1 = Start Date "ex 16 Feb 15"
    C1 = End Date ex. 22 Feb 15"

    E5 = arrival date ex 31 jan 15
    F5 = Departure Date ex 10 mar 2015

    J5 = ? I want to calculate the number of days from the start to end date.

    Below is what i have so far but it doesn't calculate correctly:

    =IF(AND(E5<B1,F5>C1),"7",F5-(E5-B1))

    If E6 is 31 Jan 15 and F6 is 20 Feb 15 then J6 should be 4, but above formula doesnt work.

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: IF/And Nestled function relating to DATE

    Is not clear what you're trying to do, are you need to calculate distance between 2 dates between B1 and C1? And what correlation with arrival and departure dates? what the logic?

  3. #3
    Registered User
    Join Date
    05-23-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: IF/And Nestled function relating to DATE

    Hi Azumi,

    Sorry for the confusion.

    I have attached a sample spreadsheet

    I work in a hotel. I need to calculate the revenue in a certain week period.

    Week period is my B1 and C1.

    If a guest stayed from 31st of Jan until 28 of Feb. On week period 23 feb until 01 mar, the weekly room nights column J5 should be 5 nights.
    Attached Files Attached Files

  4. #4
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: IF/And Nestled function relating to DATE

    Ok see this, hope this works, using array formula (means press together CTRL+SHIFT+ENTER button)
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-23-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: IF/And Nestled function relating to DATE

    Hi Azumi, if you change the week period. it doesn't work.

    what do you mean by CTRL+SHIFT+ENTER button ? i tried but nothing happened.

+ 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] Need Help Resolving Error Messages with Nestled IF and Date functions
    By Dee Mann in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-29-2013, 02:03 PM
  2. Nestled EOMONTH function problem\nestled with more
    By pjf in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-18-2013, 01:29 PM
  3. nestled function..
    By Jacqueline_ in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-19-2013, 10:16 PM
  4. Yes/No Function Relating to Text
    By EI-ALEX in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 11-18-2009, 08:32 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