+ Reply to Thread
Results 1 to 5 of 5

SUM Formula giving #VALUE due to cells populated with " - "

  1. #1
    Registered User
    Join Date
    05-27-2021
    Location
    London, England
    MS-Off Ver
    64
    Posts
    2

    SUM Formula giving #VALUE due to cells populated with " - "

    =SUM(AQ13+AQ14-AQ15)
    This is giving me an error of #Value as the contents of some of the cells is a dash ( - )
    How can i tell excel to consider the dash as a 0 without changing the format of the cell or updating the cell value to 0?

    i tried to embed an IF formula but this did not work. example below:
    =SUM(IF(AQ13=" - ",0,AQ13)AQ13+AQ14-AQ15)

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: SUM Formula giving #VALUE due to cells populated with " - "

    Hi & welcome to the board.
    How about
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-27-2021
    Location
    London, England
    MS-Off Ver
    64
    Posts
    2

    Re: SUM Formula giving #VALUE due to cells populated with " - "

    Thank you!

    That wouldnt work as i am trying to add the first 2 cells and then subtract the third

  4. #4
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: SUM Formula giving #VALUE due to cells populated with " - "

    First, there is no good reason to write SUM(AQ13+AQ14-AQ15). Simply write AQ13+AQ14-AQ15 or SUM(AQ13,AQ14)-AQ15.

    If you suspect that some cells might have text (that Excel cannot interpret as numbers), you can use the N() function to treat them as zero. For example:

    =SUM(AQ13,AQ14) - N(AQ15)

    Here, I take advantage of the fact that SUM also ignores (or treats as zero) cell references (AQ13, AQ14) that might not be numeric.

    But if only AQ13 might be non-numeric, the following would suffiice:

    =SUM(AQ13,AQ14) - AQ15

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: SUM Formula giving #VALUE due to cells populated with " - "

    i am trying to add the first 2 cells and then subtract the third
    Oops missed that, but joeu2004 has shown a few options.

+ 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: 3
    Last Post: 03-09-2019, 12:04 PM
  2. Replies: 7
    Last Post: 11-08-2017, 01:31 PM
  3. Dynamic formula in VBA giving "FALSE" as return
    By kmlloyd in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-29-2015, 11:24 AM
  4. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  5. Replies: 3
    Last Post: 12-27-2011, 05:04 PM
  6. Delete all #VALUE! errors & cells populated with "0"
    By mccrimmon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-21-2007, 10:32 AM
  7. [SOLVED] "Clean Me" Macro is giving "#VALUE!" error in the Notes field.
    By Ryan Watkins in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-10-2005, 08:05 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