+ Reply to Thread
Results 1 to 7 of 7

Blank cells to display absolute zero "-"?

  1. #1
    Forum Contributor
    Join Date
    05-23-2014
    Location
    Fredericia, Denmark
    MS-Off Ver
    Windows Office 2013, Excel 10
    Posts
    139

    Blank cells to display absolute zero "-"?

    Without using a formula in the cell or VBA, is there a built-in way (Data Validation?) for all blank cells in a named range to display "-"? I have been using the code below but it only addresses one column at a time and I want a means to cover the entire range. It is preferable to avoid VBA if possible, using Excel's built-in features. Any ideas? If not, how would I convert this code to cover the entire named range? Thanks for your help! David

    Please Login or Register  to view this content.

  2. #2
    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,936

    Re: Blank cells to display absolute zero "-"?

    2 reasons not to use CF...
    1. if the range is really large, CF will start to slow you down
    2. CF applies cosmetic changes to the appearance of a cell, and Im not sure there is any way to have - shown that way.

    There may be something in the excel settings, but I cannot find it, so far
    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

  3. #3
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    604

    Re: Blank cells to display absolute zero "-"?

    Probably not what you want, way too simple. But how about right click "format cells" / "Custom" and select:
    "_-* #,##0_-;-* #,##0_-;_-* "-"_-;_-@_-" .....from the list?

  4. #4
    Forum Contributor
    Join Date
    05-23-2014
    Location
    Fredericia, Denmark
    MS-Off Ver
    Windows Office 2013, Excel 10
    Posts
    139

    Re: Blank cells to display absolute zero "-"?

    Thanks for your response. Unfortunately there are several columns that need to have different number decimal points of accuracy and I'd really like to find a more global solution, something that would cover the entire range/table, which is pretty big. We may have to go with a macro/VBA solution but we're trying to limit the number of macros use, instead employing built-in functionality of Excel.

    Thanks again for your input! David

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

    Re: Blank cells to display absolute zero "-"?

    It would probably help if you could upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Blank cells to display absolute zero "-"?

    You can select your range (CNTRL SHFT 8) and then F5 to activate the GO TO window
    Then Special> Blanks, Then enter - and hold down CNTRL + ENTER
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Blank cells to display absolute zero "-"?

    is there a built-in way (Data Validation?) for all blank cells in a named range to display "-"?
    Blank cells, by definition display nothing.

    Why does your design require this?
    Entia non sunt multiplicanda sine necessitate

+ 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: 8
    Last Post: 07-12-2017, 05:32 PM
  2. [SOLVED] Keeping particular cell blank if the related cells show "0" or "blank"
    By Anuru in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-24-2014, 05:30 AM
  3. [SOLVED] Replace all BLANK cells in column with header title "Balance" to "0"
    By ks100 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-21-2014, 09:25 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: 02-16-2011, 02:55 PM
  6. Filling cells with absolute columns but "nth" rows
    By Clark in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-23-2006, 05:25 PM
  7. Replies: 4
    Last Post: 08-26-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