+ Reply to Thread
Results 1 to 9 of 9

ERROR!!! My formula gives inconsistent Results

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

    ERROR!!! My formula gives inconsistent Results

    Hi,

    I have a spreadsheet that calculates monthly revenue automatically between two dates. For some reason, I can't attach the file so I just print screen it.

    annual revenue.PNG


    My formula for column N is

    =IF(OR($F4="",$K4="Cancelled"),0,MAX(0,MIN($G4,P$2)-MAX($F4,O$2)+1))

    whereas,
    F is Check-In Date
    K is the Status of the Reservation
    G is the Check-out Date
    O is the start date of the month
    P is the end date of the month

    I noticed that if my check-in date was still the year 2013 the result is wrong like Row 23; Column N should be 4 not 5.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: ERROR!!! My formula gives inconsistent Results

    Why will it be 4?
    5/1/2014 - 1/1/2014 = 4 and then your formula adds 1.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

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

    Re: ERROR!!! My formula gives inconsistent Results

    all of those rows have +1 and yields correct results except row 23.

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: ERROR!!! My formula gives inconsistent Results

    You do not explain why you think it is wrong. Why will row 23 be 4 but row 7 will be 29, not 28?

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

    Re: ERROR!!! My formula gives inconsistent Results

    i noticed it has something to do with my check-out date. it is the check-out date that doesn't calculate properly.

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

    Re: ERROR!!! My formula gives inconsistent Results

    I just noticed it now, that is on the check-out date that yields incorrect result. Do you know how to fix it? Cause if I remove the +1 then all results that has check-in date sometime in january would then be incorrect.

  7. #7
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: ERROR!!! My formula gives inconsistent Results

    You may try:
    =IF(OR($F4="",$K4="Cancelled"),0,MAX(0,MIN($G4,P$2+1)-MAX($F4,O$2)))
    If this is not correct you must explain what will be correct.

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

    Re: ERROR!!! My formula gives inconsistent Results

    OMG!!! it works.

    Thank you so much.

  9. #9
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: ERROR!!! My formula gives inconsistent Results

    You are welcome.

+ 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] Inconsistent if(and(or results, HELP!!
    By Groovicles in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 08-03-2013, 11:50 AM
  2. quantitative anomaly-- inconsistent values, help me find formula error!
    By mtmorce in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-21-2013, 03:27 PM
  3. Inconsistent IF Results
    By BW29 in forum Excel General
    Replies: 3
    Last Post: 12-20-2010, 10:12 AM
  4. If/VLookup/Match Formula Results Inconsistent
    By hardpenguin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-08-2010, 05:05 PM
  5. Formula producing inconsistent results
    By joseclar in forum Excel General
    Replies: 5
    Last Post: 05-20-2009, 01:41 PM

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