+ Reply to Thread
Results 1 to 11 of 11

Deleting blank cells that contain a forumula

  1. #1
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Deleting blank cells that contain a forumula

    Hey i have a piece of code that does what i want when the cell doesn't havea formula in it.
    However, i need it to delete a cell that appears blank even if there is a formula in it.

    If not this.
    A piece of code that hides a blank cell and reveals it when a value (not a formula) is in it would be great

    my stuff so far is simple:

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Deleting blank cells that contain a forumula

    Maybe try this:
    Please Login or Register  to view this content.
    You can choose whether or not you want to delete the cells or just hide the rows. Also you will notice that when we delete, we begin with the bottom and work our way up to maintain the row numbers.

    Hope this helps.

    abousetta
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  3. #3
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Re: Deleting blank cells that contain a forumula

    This seems to be hiding everything including formula and strings
    I cant quite work out why.

  4. #4
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Deleting blank cells that contain a forumula

    Change this row
    Please Login or Register  to view this content.
    to this:
    Please Login or Register  to view this content.
    Now it will only hide the row if the cell contains a formula and the result is blank.

  5. #5
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Re: Deleting blank cells that contain a forumula

    Its now not doing anything.

    The cell structure is just as follows for the blank cells: ='CLEAN (2)'!$A12 etc. All other cells that are returning data from Clean (2) have values in them.
    Is there any reason why its now not doing anything?

  6. #6
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Deleting blank cells that contain a forumula

    What does Cell A12 in sheet Clean(2) contain? A space? or is it just blank?

  7. #7
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Re: Deleting blank cells that contain a forumula

    It would be blank as its not sending any data through to the new sheet.

  8. #8
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Re: Deleting blank cells that contain a forumula

    THe cell is just blank. there is a macro that puts stuff in the cell but it there is no need for anything to be there its just blank not a space.

  9. #9
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Deleting blank cells that contain a forumula

    There has to be something there because if there wasn't then the result of this formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    would be 0

  10. #10
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Re: Deleting blank cells that contain a forumula

    I have zero value off atm. I forgot about that.
    -.-
    I've fixed it now. sorry about that

  11. #11
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Deleting blank cells that contain a forumula

    If it is working now and you don't have any more questions then please mark the thread as solved.

    Thanks.

    abousetta

+ 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