+ Reply to Thread
Results 1 to 14 of 14

Why won't a simple formula work in an empty cell

  1. #1
    Registered User
    Join Date
    08-23-2018
    Location
    Weston super Mare
    MS-Off Ver
    16.16
    Posts
    12

    Unhappy Why won't a simple formula work in an empty cell

    I am a newbe to excel but I have a reasonable understanding of formulas, but the simple formula has me baffled!

    Cells
    A1 =£1.27
    B1 =Empty (no values)

    Formula in B1

    =if(A1>B1,A1,B1)

    The outcome in B1 = 0 (format General and Currency £0.00)
    This has baffled me so I populated Cell C1 with £1.50 and changed the formula to if(A1>C1,A1,C1) and it worked.
    What do I have to add anything to my original formula to make it work? Any advice will be greatly appreciated.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,652

    Re: Why won't a simple formula work in an empty cell

    Welcome to the forum.

    Try this:

    =if(OR(A1>B1,B1=""),A1,B1)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Why won't a simple formula work in an empty cell

    That's strange, I get 1.27 in B1 in those circumstances.

    You have of course created a circular reference by specifying B1 in a formula in B1 but it's not clear to me why that would make any difference.

    Are you able to upload your workbook.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    08-23-2018
    Location
    Weston super Mare
    MS-Off Ver
    16.16
    Posts
    12

    Re: Why won't a simple formula work in an empty cell

    Thank you AliGW and Richard, unfortunately Ali your formula still produced a 0, I have attached my spreadsheet to see i what I am doing wrong!
    Attached Files Attached Files

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Why won't a simple formula work in an empty cell

    1. How did you get that "disclaimer" message at the top?

    2. Did you notice, as Richard pointed out, that you have a circular ref error in B1 (caused when a cell references itself), circ ref errors can cause all sorts of unexpected problems.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    08-23-2018
    Location
    Weston super Mare
    MS-Off Ver
    16.16
    Posts
    12

    Re: Why won't a simple formula work in an empty cell

    The disclaimer is purely for accessing market data via excel, and is a standard disclaimer so that they cannot be held accountable for the information provided. With regards to circular ref error in B1, as I stated I am a newbe to excel and will gratefully receive advice on how to resolve a circular ref error.

  7. #7
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,907

    Re: Why won't a simple formula work in an empty cell

    You'll need to enable iterative calculation in the Excel Options (or Preferences if you're on a Mac).
    Rory

  8. #8
    Registered User
    Join Date
    08-23-2018
    Location
    Weston super Mare
    MS-Off Ver
    16.16
    Posts
    12

    Re: Why won't a simple formula work in an empty cell

    Many thanks Rorya will do on my mac

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Why won't a simple formula work in an empty cell

    Quote Originally Posted by easygoingdave View Post
    The disclaimer is purely for accessing market data via excel, and is a standard disclaimer so that they cannot be held accountable for the information provided. With regards to circular ref error in B1, as I stated I am a newbe to excel and will gratefully receive advice on how to resolve a circular ref error.
    Sorry, I was asking how it was applied. Im not really bothered about what it does or what it's for.

    A circ ref error is when a cell refers to itself in a formula. In your case, you have a formula IN b1 that refers TO B1

  10. #10
    Registered User
    Join Date
    08-23-2018
    Location
    Weston super Mare
    MS-Off Ver
    16.16
    Posts
    12

    Re: Why won't a simple formula work in an empty cell

    Hi, yes I now realise I have circular error, but I am not sure how to change the formula to reflect what I want achieve. All I want to do is: if the data (number) in A1 is more than the data (number) in B2, then replace data in B2 with A1 data. however if it's not then keep the data in B1. I thought it was a simple problem, but because B1 is initially empty the formula does not work! Any advice would be greatly appreciated.

  11. #11
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,907

    Re: Why won't a simple formula work in an empty cell

    If you turn iteration on, your formula should work.

  12. #12
    Registered User
    Join Date
    07-13-2019
    Location
    Mansehra, Pakistan
    MS-Off Ver
    2010
    Posts
    46

    Re: Why won't a simple formula work in an empty cell

    Hi all!

    1. What does Option "Enable Iterative Calculation" actually means?
    2. And What are other options for under "Enable Iterative Calculation" i.e. "Maximum Iterations" & "Maximum Change".
    3. In which situations this option can be turned on or off?

    Explanation of above points will be very helpful for those who have no idea about this option.

    Thanks

  13. #13
    Registered User
    Join Date
    08-23-2018
    Location
    Weston super Mare
    MS-Off Ver
    16.16
    Posts
    12

    Re: Why won't a simple formula work in an empty cell

    Hi Rorya
    Although I don't understand iterations, it worked!!!! Thank you, much appreciated

  14. #14
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Why won't a simple formula work in an empty cell

    Quote Originally Posted by easygoingdave View Post
    Hi, yes I now realise I have circular error, but I am not sure how to change the formula to reflect what I want achieve. All I want to do is: if the data (number) in A1 is more than the data (number) in B2, then replace data in B2 with A1 data. however if it's not then keep the data in B1. I thought it was a simple problem, but because B1 is initially empty the formula does not work! Any advice would be greatly appreciated.
    In that case, and because it's not generally a good idea to build in circular references (and believe me if circular references are indirectly circular and not a simple one like this they are extremely hard to track down), then I suggest you use a 3rd cell for your answer.

    i.e. say in A3
    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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. Replies: 5
    Last Post: 06-14-2020, 08:18 AM
  2. [SOLVED] Simple Formula, cant get logic to work
    By cdotyii in forum Excel General
    Replies: 3
    Last Post: 07-31-2015, 09:32 AM
  3. Excel 2007 : Help Cant get this simple formula to work
    By impresslb in forum Excel General
    Replies: 1
    Last Post: 09-18-2011, 11:53 AM
  4. Simple check if cell empty and fill it
    By knab in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-13-2009, 04:47 AM
  5. [SOLVED] simple code hide/show rows with cell = empty, set value or any val
    By ivory_kitten in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-17-2006, 09:30 PM
  6. (Very) Simple Formula Doesn't Work
    By Erehwon in forum Excel General
    Replies: 5
    Last Post: 03-21-2006, 09:35 PM
  7. Why wont this simple formula work
    By Bigredno8 in forum Excel General
    Replies: 3
    Last Post: 12-06-2005, 11:30 PM

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