+ Reply to Thread
Results 1 to 4 of 4

VBA or MACRO to show ZERO values in a certain cell only

  1. #1
    Registered User
    Join Date
    05-16-2016
    Location
    Philippines
    MS-Off Ver
    excel
    Posts
    40

    Post VBA or MACRO to show ZERO values in a certain cell only

    Hi Guys!

    Good Day to all.

    Need some help here.

    Is it possible to show ZERO (0) values on a certain cells only if i turn off the (Show a zero in cell that have zero value)? Because if i turn on that it will ruin my worksheet.

    Thanks!

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA or MACRO to show ZERO values in a certain cell only

    If the "certain cells" have formulas, you can show or hide zeros by wrapping your formula in an IF function...

    Hide zeros in cells with formulas
    =IF(Your_Formula = 0, "", Your_Formula)


    Or if you have the option Show Zeros turned off, this will show a text-zero in a formula cell.
    =IF(Your_Formula = 0, "0", Your_Formula)
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,164

    Re: VBA or MACRO to show ZERO values in a certain cell only

    Hi,

    I was thinking something like AlphaFrog above but tie your formula to a Cell like A1. If A1 = 0 then show zeros and if A1 = 1 then make those zeros a blank.

    =if(A1=0, your formulas answer = 0, your formulas answer = "")
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    05-16-2016
    Location
    Philippines
    MS-Off Ver
    excel
    Posts
    40

    Re: VBA or MACRO to show ZERO values in a certain cell only

    Quote Originally Posted by AlphaFrog View Post
    If the "certain cells" have formulas, you can show or hide zeros by wrapping your formula in an IF function...

    Hide zeros in cells with formulas
    =IF(Your_Formula = 0, "", Your_Formula)


    Or if you have the option Show Zeros turned off, this will show a text-zero in a formula cell.
    =IF(Your_Formula = 0, "0", Your_Formula)
    Thank for the help AlphaFrog you made my day.. Thanks

+ 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. [SOLVED] Macro that can cut paste rows, when values are blanks or only show two values in a row
    By ugalskov in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-09-2016, 11:40 AM
  2. Macro to to take all duplicate values show them once on a sheet
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-11-2014, 05:18 PM
  3. Need macro/formula to only show rows that have values above a benchmark
    By thedutchrudder in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-17-2014, 12:37 PM
  4. How to show values matching each cell values
    By hellosir in forum Excel General
    Replies: 8
    Last Post: 05-08-2014, 05:55 AM
  5. Replies: 12
    Last Post: 05-10-2013, 11:12 AM
  6. Macro show in msgbox different values to MT or PZ in multirange
    By feroguz in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-24-2013, 11:49 AM
  7. Macro to Copy Paste Rows Depending on a Cell Value and show values against each row
    By prkhan56 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-29-2013, 11:41 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