+ Reply to Thread
Results 1 to 4 of 4

Inconstant results within 'if' functions

  1. #1
    Registered User
    Join Date
    02-13-2019
    Location
    Aberdeen, WA
    MS-Off Ver
    Office 2016 full version
    Posts
    2

    Inconstant results within 'if' functions

    Hello,
    I have been creating a robust spreadsheet that relies heavily on 'if' functions, however I have encountered something strange and frustrating. Identical formula formattings are producing 2 different results.
    Item 1:
    =IF(AJ147="3",0,3)+IF(AM147="3",0,3)+IF(AP147="3",0,3)+IF(AS147="3",0,3)+IF(AV147="3",0,3)+IF(AY147="3",0,3)+IF(BB147="3",0,3)+IF(BE147="3",0,3)
    This function is working correctly.
    However, Item 2:
    =IF(AJ150="3",0,3)+IF(AM150="3",0,3)+IF(AP150="3",0,3)+IF(AS150="3",0,3)+IF(AV150="3",0,3)+IF(AY150="3",0,3)+IF(BB150="3",0,3)+IF(BE150="3",0,3)
    Is not producing the correct value.
    I can modify item 2 to remove the quotation marks and it now works, but if I remove the quotation marks is item 1 it no longer works.
    I am relying on a similar formula variation to apply to several hundred cells, but the inconsistency is causing major problems.
    I have tried having the reference cells formatted both generally and as a number, same with the formula cells, and this changed nothing.
    The reference cells also are formulas, but virtually identical as the above examples, and they have not demonstrated any challenges.
    Can anyone provide insight into this issue?

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Inconstant results within 'if' functions

    Hello confused98520. Welcome to the forum.

    Formatting is cosmetic. It does not affect cell values. My first thought is that row 146 contains text "numbers" and row 150 does contain numbers. Those are different data types. If you are not aware of it putting quotes around numbers converts them to text. Text has a numeric value of 0.

    The data types ... text / numbers need to be consistent. It is almost always better to go with actual numbers in the reference data and then remove the quotes from formulas.

    Let us know if you need further assist.
    Dave

  3. #3
    Registered User
    Join Date
    02-13-2019
    Location
    Aberdeen, WA
    MS-Off Ver
    Office 2016 full version
    Posts
    2

    Re: Inconstant results within 'if' functions

    Thank you!
    This seems to have fixed the problem. I have not encountered problems in the past with text "numbers" over regular numbers and I would have assumed formatting the cells as a number would fix it, but removing quotations in the formulas leading to those cells seems to have worked.

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Inconstant results within 'if' functions

    You are welcome. Thank you for the feedback.

    Yes. It can be confusing especially when the ...IFs family of functions treats them the same.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Last edited by FlameRetired; 02-14-2019 at 04:13 PM.

+ 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] Same If functions with different results
    By max333 in forum Excel General
    Replies: 7
    Last Post: 08-26-2017, 02:35 AM
  2. Could someone please help - functions to analyse results
    By twmtwp in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 08-25-2017, 10:05 AM
  3. [SOLVED] Returning multiple results using an Array with AND and OR functions
    By simmo86 in forum Excel General
    Replies: 6
    Last Post: 12-28-2016, 07:12 PM
  4. [SOLVED] Do not automatically update results for certain functions using a macro?
    By alice2011 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-22-2015, 08:32 AM
  5. Differrent results with similar functions Anyone know why?
    By Jebrowsky in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-15-2013, 06:45 PM
  6. [SOLVED] Database Functions - Strange results
    By Bob in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-08-2006, 03:50 PM
  7. [SOLVED] functions are not displaying the results
    By [email protected] in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-16-2006, 09:30 AM

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