+ Reply to Thread
Results 1 to 5 of 5

If cell is blank, replace value with zero

  1. #1
    Registered User
    Join Date
    03-17-2014
    Location
    London, UK
    MS-Off Ver
    Excel 2010
    Posts
    26

    If cell is blank, replace value with zero

    Hello everyone,

    I've been repurposing some VBA I've found online. The original code is:

    Please Login or Register  to view this content.
    But gives me an error. Any help? I'm very much a VBA noob...
    Last edited by lucazzo; 07-06-2016 at 12:26 PM.

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: If cell is blank, replace value with zero

    Moderation removed.
    Last edited by Winon; 07-05-2016 at 07:44 AM. Reason: Code Tags added bt FDibbins. Thanks Ford.:)
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    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,929

    Re: If cell is blank, replace value with zero

    I have added code tags for you (this time )
    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

  4. #4
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: If cell is blank, replace value with zero

    Try:
    Please Login or Register  to view this content.
    多么想要告诉你 我好喜欢你

  5. #5
    Registered User
    Join Date
    03-17-2014
    Location
    London, UK
    MS-Off Ver
    Excel 2010
    Posts
    26

    Re: If cell is blank, replace value with zero

    Actually solved the issue in another way, by outright setting a new variable for Rng with a value of zero in the cases where the initial cell is empty.
    Your solution is very interesting. I'll study it some

    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)

Similar Threads

  1. [SOLVED] i have a column of text and zero's, i need to replace the 0 with a blank cell
    By dmcgov in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-15-2016, 01:02 PM
  2. [SOLVED] Concatenate cells and replace if a particular cell is blank
    By bloodlvst in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-13-2016, 12:08 PM
  3. Replace blank cell or cell with one character with specific text
    By shaz0503 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-15-2015, 12:57 AM
  4. How to replace #n/a to blank CELL
    By NILESH ZALA in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-18-2013, 11:03 AM
  5. find the blank cell in range and replace it
    By ccs1981 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-03-2008, 03:11 AM
  6. [SOLVED] How Do I find/replace a blank cell with a formula?
    By Alvin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-23-2006, 03:30 PM
  7. Replace null string with blank cell
    By gjcase in forum Excel General
    Replies: 2
    Last Post: 08-09-2005, 09:13 AM

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