+ Reply to Thread
Results 1 to 9 of 9

=max(a1:b1) only returns 0 in empty b1 cell and not number in a1

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

    =max(a1:b1) only returns 0 in empty b1 cell and not number in a1

    I cannot understand why a cell B1 returns 0 when I refresh the sheet.
    I get a daily share price from the internet. That share price is in cell a1. I track the share price on a daily basis, however, I want to record its highest price throughout the year. the formula i use is

    =MAX(A1:B1)

    However, if A1 has £6.45 when I refresh B1 will only return 0. I've checked the formatting of each cell, I even tried using the following: =IF($Y$1,0,MAX(A1:B1)) with 0 in Y1

    I'm baffled

    Thank you

    Dave

  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,869

    Re: =max(a1:b1) only returns 0 in empty b1 cell and not number in a1

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.

    Administrative Note:

    Is your forum profile showing the Excel PRODUCT that you need this to work for?

    Members will tailor the solutions they offer to the Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your product is for Mac, please also state this.

    The three most recent Excel products are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the version number in your profile (e.g. MS365 Version 2306). This is in the About Excel section further down the Account page.

    Thanks.
    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 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,869

    Re: =max(a1:b1) only returns 0 in empty b1 cell and not number in a1

    Is the £6.45 TEXT or a real NUMBER? Sounds like it might be the former, which is why we need to see the workbook to confirm.

  4. #4
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,059

    Re: =max(a1:b1) only returns 0 in empty b1 cell and not number in a1

    Did you put the formula in cell B1? If so, =MAX(A1:B1) will create a circular reference error and always return 0.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: =max(a1:b1) only returns 0 in empty b1 cell and not number in a1

    If you manually typed the pound sign(s) ( £ ), that will make the cell text.

    Remove any manually entered currency symbols and use Cell Formatting | Currency.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  6. #6
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    1,980

    Re: =max(a1:b1) only returns 0 in empty b1 cell and not number in a1

    could try

    Formula: copy to clipboard
    Please Login or Register  to view this content.

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

    Re: =max(a1:b1) only returns 0 in empty b1 cell and not number in a1

    the £6.45 is from the internet (share price). can you tell me how I can attach a sanitised spreadsheet, I can't seem to find the attached symbol?

    dave

  8. #8
    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,869

    Re: =max(a1:b1) only returns 0 in empty b1 cell and not number in a1

    Read post #2.

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: =max(a1:b1) only returns 0 in empty b1 cell and not number in a1

    the £6.45 is from the internet (share price)
    Chances are it is being seen as text and/or it has non-printable character before and/or after it.

+ 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. IF(ISNA(VLOOKUP.. returns 0 instead of empty cell
    By AnuLii in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-03-2019, 08:18 AM
  2. [SOLVED] Using macro to find first empty cell in column. If range is empty returns error.
    By A440 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-23-2019, 11:03 AM
  3. [SOLVED] formula =Cell returns 0 if cell is empty - can it be blank?
    By jowes in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-05-2013, 08:36 AM
  4. [SOLVED] Lookup (vector) returns 0 when cell is empty
    By kieranm105 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-10-2013, 04:51 AM
  5. Excel 2007 : =Average returns #Value if a cell is empty
    By mojogoon in forum Excel General
    Replies: 7
    Last Post: 11-22-2010, 02:31 PM
  6. Formula returns #Value! empty cell value
    By ingineu in forum Excel General
    Replies: 4
    Last Post: 10-02-2006, 05:49 AM
  7. [SOLVED] When I enter a number in an empty cel, de cel returns the value d.
    By Paul KdN in forum Excel General
    Replies: 2
    Last Post: 01-13-2005, 06:06 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