+ Reply to Thread
Results 1 to 12 of 12

IF function anomaly

Hybrid View

  1. #1
    Registered User
    Join Date
    12-07-2007
    MS-Off Ver
    Office Pro 2000 & 2007
    Posts
    26

    IF function anomaly

    Hi

    I have an IF statement which shows the expected answer in the formula wizard, but returns "#VALUE!" in the cell, depending on location. The formula displays correctly if it's in the same column as one of the queried cells, but doesn't if placed anywhere else.
    I have checked the cell formatting and this is the same throughout the sheet.

    The spreadsheet has been written in Excel 2000.

    For info, the problem formula is:
    =IF(N4:S4="overdue","Overdue","ok")

    Where the queried cells (N4:S4) contain variations of the following:
    =IF(AG4<N2+22,"overdue",AG4-21)

    AG4 is a specified date, and N2 is today's date.

    Many thanks for your time.

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    An extract from the help menu, this may be the cause

    Microsoft Excel cannot translate the text into the correct data type. Make sure the formula or function is correct for the required operand or argument, and that the cells that are referenced by the formula contain valid values. For example, if cell A5 contains a number and cell A6 contains the text "Not available", the formula =A5+A6 will return the error #VALUE!.
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    12-07-2007
    MS-Off Ver
    Office Pro 2000 & 2007
    Posts
    26
    Thanks for the reply

    The formula works fine if it's in one of the queried columns (ie. N:S), but if I move it to a different column it returns the #VALUE!
    I have made sure that the correct cell ref's have been carried over when the problem occurs, and also that the cell format is the same, which is why I can't understand why it only works in certain columns.

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Is it possible to drop a sample with the problem, so that we can try and find it?

    To post a zipped example, go to “My Documents” or wherever you have your file stored, right-click and “Send to > Compressed file”, then attach this zipped file to your post.

  5. #5
    Registered User
    Join Date
    12-07-2007
    MS-Off Ver
    Office Pro 2000 & 2007
    Posts
    26
    Hopefully the sheet should be attached.

    Thanks for your time!
    Attached Files Attached Files

  6. #6
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    Using relative referenced would help.
    But if you are dragging that formula along a row,

    =(N4="overdue","overdue","OK") is another formulation.

  7. #7
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Quote Originally Posted by BBS
    Hopefully the sheet should be attached.

    Thanks for your time!
    Shouldn't the query be something like this in N7, then drag along to S7

    =IF(N4>$N$2,"ok","overdue")

+ 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