+ Reply to Thread
Results 1 to 3 of 3

Finding Blank cells and inserting a number

  1. #1
    Forum Contributor
    Join Date
    11-08-2011
    Location
    Leeds
    MS-Off Ver
    Excel 2010
    Posts
    279

    Finding Blank cells and inserting a number

    Hi

    I was just wondering if anyone knew a formula for finding the blanks in a range of cells and to insert a 0.

    Please see an attached example thanks

    Thanks
    Attached Files Attached Files
    Last edited by skate1991; 02-14-2012 at 06:09 AM.

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Finding Blank cells and inserting a number

    You can select your range then press F5 - choose special - mark "empty cells" then put 0 and confirm this CTRL + ENTER
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Valued Forum Contributor
    Join Date
    07-21-2008
    Location
    London, UK
    Posts
    326

    Re: Finding Blank cells and inserting a number

    Its impossible to write a correct function (UDF) to add a zero in the empty cell (that is it would be bad practice, not impossible i mean, just to clear that up). The reason is functions return results / values they do not by definition take actions which is what add a zero is.

    So you need a procedure to pars the function and evaluate the result / value and then the procedure take the action of adding a zero

    In real life this is nonsense and people do all sorts of things good bad and ugly. Thats why Jacks codes are broken in to different routines and should be easy to edit

    so if you want VBA scripts to find the cell
    Please Login or Register  to view this content.
    but hang of that the magic bit bit not really much use so ... this code will add zeros to all blanks in the range top to bottom and is flexable
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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