• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Display 0 instead of blanks

Sharky

New Member
Hi,


I have the following format that will be applied as part of a macro:


"_-[$€-2] * #,##0.00_ ;_-[$€-2] * -#,##0.00 ;_-[$€-2] * ""-""??_ ;_-@_ "


This is basically an accounting format with the euro currency. What I need to add to it though it something that will display a 0 instead of a blank. I already know that its the 3rd part of this format that needs to be altered. Ie: _-[$€-2] * ""-""??_


Im more a macro guy and have generally left the formatting to excel via macro recording but I cant seem to get this to do what I want it to.


Thanks in advance.
 
I found the following VBA code to sort the above issue:


First select the cells then do:


Selection.SpecialCells(xlCellTypeBlanks).Select

Selection.FormulaR1C1 = "0"
 
Back
Top