+ Reply to Thread
Results 1 to 3 of 3

IF formula evaluates to wrong value

  1. #1
    Registered User
    Join Date
    01-29-2014
    Location
    Calgary Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    IF formula evaluates to wrong value

    Hi

    I have the following formula: IF(SELL_INVESTMENT = "YES" , 1,2) It returns not 1 or 2 but 0. The worksheet contains over 1000 cells. Trace Precedents verifies that the formula evaluates the correct cell and that it contains "yes". I created a very simple worksheet to test the formula and here it correctly returns 1. I cant figure it out.
    I am stuck.

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: IF formula evaluates to wrong value

    Welcome to the forum.
    you can test the cell using len.
    =len() if it returns 4 you have space/s on those "Yes"
    or
    is "Sell_investment" a range?

    you can upload the problem file here.

    To attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Registered User
    Join Date
    01-29-2014
    Location
    Calgary Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: IF formula evaluates to wrong value

    Quote Originally Posted by vlady View Post
    Welcome to the forum.
    you can test the cell using len.
    =len() if it returns 4 you have space/s on those "Yes"
    or
    is "Sell_investment" a range?

    you can upload the problem file here.

    To attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    HI;

    Thanks for your response. I found my problem, it turned out to be circular reference. Interestingly it turns out that the IF formula returns a zero instead of an error notice. Error checking for circular reference reveals the problem. The cell with the formula is not marked as an error. Only after saving and then reloading the spreadsheet is there a notice that there is a circular reference error. This can be confusing. Again thanks for your response. I hope that my experience can be of help to you.

+ 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. lookup formula that evaluates two criteria
    By waternut in forum Excel General
    Replies: 3
    Last Post: 09-02-2011, 08:57 AM
  2. Not charting points where formula evaluates to null
    By Renzo in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 05-26-2009, 03:42 PM
  3. SUM formula evaluates to zero. Why?
    By paulr in forum Excel General
    Replies: 2
    Last Post: 02-12-2009, 04:42 PM
  4. Replies: 2
    Last Post: 06-14-2006, 03:20 PM
  5. [SOLVED] Formula evaluates to #VALUE
    By glen.e.mettler@lmco.com in forum Excel General
    Replies: 4
    Last Post: 03-28-2006, 08:45 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