+ Reply to Thread
Results 1 to 18 of 18

Exclude random cells from SUM

  1. #1
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Exclude random cells from SUM

    Hi
    Is there a way to format cells containing numbers so that they will be excluded from a SUM (or any other formula), in other words, render their value zero.
    I tried format as text, it did not work, it just left aligned the number.

    excel 2002
    thanks

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

    Re: Exclude random cells from SUM

    Not tested, but have you tried preceding them with a single quotation mark (')?
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Exclude random cells from SUM

    Yes that would do it, however, that requires editing each one of the cells separately.
    I am looking to pick them all, or pick a range and do it.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,696

    Re: Exclude random cells from SUM

    Find and replace?

  5. #5
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Exclude random cells from SUM

    Find what?
    The values are all different...

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,696

    Re: Exclude random cells from SUM

    Then I don't know - sorry. It wasn't clear from your opening post that you needed to do this en masse.

  7. #7
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Exclude random cells from SUM

    Never mind... Thanks anyway!

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,696

    Re: Exclude random cells from SUM

    You're welcome! I think the only way is editing each cell concerned.

  9. #9
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Exclude random cells from SUM

    Maybe another GURU will have a "mass" idea!...

  10. #10
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Exclude random cells from SUM

    What about a macro to run on several chosen cells (or a range of cells) and put a single quotation mark before the number?

    Of course a macro would be required to do just the opposite: remove it...

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,696

    Re: Exclude random cells from SUM

    That might work, but even a macro will need to identify the cells - you say that there is no way that can be done (all different values). How many cells are we talking about?

  12. #12
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Exclude random cells from SUM

    I can mouse pick the cells, or mouse pick an entire range.

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,696

    Re: Exclude random cells from SUM

    If you set to now and did it manually, would it be likely to be done by the time you got a better answer here? If the answer is "possibly", then I would just get on and do it manually. Either that, or think of a way of reorganising your data so that the cells in question are taken out of the range where the sum is taking place. You haven't said WHY you need those cells to be excluded or WHAT the purpose is. With more information, forum members may be able to offer a better solution.

    You could also post a sample workbook here.

  14. #14
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2503 Build 16.0.18604.20000) 64-bit
    Posts
    3,992

    Re: Exclude random cells from SUM

    You can try a way.... follow below step

    Assuming your data is in A column, then select the whole B column->>>> In B1 Cell put =CONCATENATE("",F3) and press control enter. By this way all value will convert in text format and no one function will calculate their value.

    Hope it will help you
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  15. #15
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Exclude random cells from SUM

    I am doing that now but is awkward. The makros would be perfect but I do not know how to write them.... :-(

  16. #16
    Forum Contributor
    Join Date
    01-20-2014
    Location
    Greece
    MS-Off Ver
    20 yr. old Excel 2002!
    Posts
    710

    Re: Exclude random cells from SUM

    The answer is here: https://support.microsoft.com/en-us/kb/192891

    Copying just in case the link goes dead:

    Please Login or Register  to view this content.

  17. #17
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,696

    Re: Exclude random cells from SUM

    Glad your issue is resolved!

  18. #18
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Exclude random cells from SUM

    If the cells to be excluded are in a contiguous range you could use something like an X to mark them:

    Data Range
    A
    B
    C
    1
    75
    325
    2
    76
    X
    3
    30
    4
    87
    X
    5
    79
    6
    38
    7
    64
    8
    39
    9
    18
    X
    10
    23
    X
    11
    ------
    ------
    ------


    =SUMIF(B1:B10,"",A1:A10)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. Exclude certain cells
    By Alvenzo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-21-2016, 08:29 AM
  2. Add EXCLUDE Option in table to Exclude from Solver
    By lbofbb in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-17-2015, 09:05 AM
  3. sum a range of cells but exclude the cells that are strings
    By postdirector in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-10-2013, 05:55 PM
  4. [SOLVED] Count number of cells that contain text but exclude cells that contain quotation marks
    By Cantyman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-22-2012, 03:57 PM
  5. Exclude Blank cells when matching against other cells.
    By Neil07979 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-05-2008, 09:28 AM
  6. Replies: 2
    Last Post: 09-24-2005, 08:05 PM
  7. Replies: 6
    Last Post: 08-04-2005, 10:05 PM

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