+ Reply to Thread
Results 1 to 12 of 12

Excel wont calculate if statments

  1. #1
    Forum Contributor
    Join Date
    04-30-2011
    Location
    wirral,england
    MS-Off Ver
    Excel 2010
    Posts
    148

    Excel wont calculate if statments

    Hello All
    I am using excel 2007,the number 10 is entered in cell A1,formula in B1 is =IF(AI<20,"yes").
    Getting formula contains an error message,<20,"yes" highlighted.Simple formulas ie 10+20 and SUM function calculate ok.SUMIF and COUNTIF wont calculate.
    I have tried to change the format to general and number to no avail,I dont think its a format problem as its slill
    able to calculate simple formulas.Many thanks for help given.
    Last edited by bigband1; 03-28-2014 at 09:25 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,825

    Re: Excel wont calculate if statments

    You have actually typed AI in that formula rather than A1 - is that what is causing the problem?

    Pete

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

    Re: Excel wont calculate if statments

    Your formula refers to AI not A1.
    • 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

  4. #4
    Forum Contributor
    Join Date
    04-30-2011
    Location
    wirral,england
    MS-Off Ver
    Excel 2010
    Posts
    148

    Re: Excel wont calculate if statments

    Sorry typing error the formula is in A1

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,508

    Re: Excel wont calculate if statments

    is it possible it has a space in it or is formatted as text? what happens if you point =isnumber(a1) at it?
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

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

    Re: Excel wont calculate if statments

    What is error message? Also what should formula return if criteria not met? (I hope is another typo that you say formula is in A1 - this would be circular reference)

  7. #7
    Forum Contributor
    Join Date
    04-30-2011
    Location
    wirral,england
    MS-Off Ver
    Excel 2010
    Posts
    148

    Re: Excel wont calculate if statments

    In A1 i have 10,In B1 i have the formula =IF(A1<20,"YES"),I have tried this on another comp,it calcs ok.
    If i enter the formula =ISNUMBER(A1) in B1 i get TRUE.The error message is The formula you typed contains an error.Could it be a bug.

  8. #8
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,508

    Re: Excel wont calculate if statments

    You may have to either post it as is or a representative sample to get more help so people can see what is happening. If you use the same info and formula elsewhere do you get the same result? Usually you need the "else what to do" in an if statement and you don't have that though it should still work. you know, =IF(A1<20,"YES", but if not then what?)

  9. #9
    Forum Contributor
    Join Date
    04-30-2011
    Location
    wirral,england
    MS-Off Ver
    Excel 2010
    Posts
    148

    Re: Excel wont calculate if statments

    Please find attached worksheet,I have omitted the = sign to enable attachment.
    Attached Files Attached Files
    Last edited by bigband1; 03-24-2014 at 12:10 PM.

  10. #10
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,825

    Re: Excel wont calculate if statments

    It works okay for me. I just put the = sign in front of the formula and it gave me yes. If I change A1 to 25 I get FALSE, as expected.

    Pete

  11. #11
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,508

    Re: Excel wont calculate if statments

    Agree w/Pete, needs = in front of the equation then it will work.

  12. #12
    Forum Contributor
    Join Date
    04-30-2011
    Location
    wirral,england
    MS-Off Ver
    Excel 2010
    Posts
    148

    Re: Excel wont calculate if statments

    Got it
    Somehow the comma in formulas changed to a pipe,maybe through an imported formula.Changed it back to a comma in regional settings,list separator.Found the answer in excel forum question "Formulas require pipe instead of comma" 03/18/11.Thanks all for your answers.

+ 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. cell wont calculate
    By Genbar in forum Excel General
    Replies: 6
    Last Post: 03-07-2007, 06:22 PM
  2. [SOLVED] excel wont calculate
    By john mcmichael in forum Excel General
    Replies: 1
    Last Post: 10-18-2005, 01:05 PM
  3. [SOLVED] wont calculate
    By john mcmichael in forum Excel General
    Replies: 1
    Last Post: 08-12-2005, 11:05 AM
  4. Cell wont calculate automaticaly
    By Karim Kamal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-14-2005, 01:05 PM
  5. Cell wont calculate automaticaly!
    By krhyme in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-14-2005, 11:05 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