+ Reply to Thread
Results 1 to 11 of 11

Delete special blank cells not recognising blank cells

  1. #1
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    334

    Delete special blank cells not recognising blank cells

    I have a worksheet in which I have parsed a whole lot of data (all in column A)
    I have used the TRIM & SUBSTITUTE functions to strip out any unnecessary spaces.
    When I attempt to use goto special blank cells then delete excel does not recognise any blanks cells!
    If I first scroll through each cell (A1, A2, A3, ....etc) then excel will recognise the blank cells & delete them.

    Is there a way around this or am I missing something?

    Any assistance appreciated.
    Thanks.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Delete special blank cells not recognising blank cells

    Try this one. If they are real blanks, it should delete them.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    334

    Re: Delete special blank cells not recognising blank cells

    delblanks test.xlsx
    Quote Originally Posted by AB33 View Post
    Try this one. If they are real blanks, it should delete them.

    Please Login or Register  to view this content.
    Sorry AB your code does not work.
    I get a runtime 1004 error "no blank cells were found"

    I have attached a sample from my workbook. As you can see there are blank cells but they are not deleting!

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Delete special blank cells not recognising blank cells

    Hi, anrichards22,

    maybe you would need to post the code which leads to this situation instead of working on it later on?

    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Delete special blank cells not recognising blank cells

    Loop

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Delete special blank cells not recognising blank cells

    No Loop

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    334

    Re: Delete special blank cells not recognising blank cells

    Thanks AB problem solved.

    Thanks HaHoBe your code works as well.

  8. #8
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Delete special blank cells not recognising blank cells

    Hi, anrichards22,

    if the worksheet results from any other code I recommend to look over that code as the issue is likely to have itīs origin in that code - I still donīt like to work on something thatīs coming out wrong from other codings (will try to solve it in the first code).

    Ciao,
    Holger

  9. #9
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    334

    Re: Delete special blank cells not recognising blank cells

    Please Login or Register  to view this content.
    Holger,

    The worksheet is a text document that is 75% html source code which is imported into Excel.
    I cannot post actual data as it is confidential.
    Do you have an explanation for Excel not recognising the blank cells after I run the find/replace & the trim/substitute functions?

  10. #10
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Delete special blank cells not recognising blank cells

    Hi, anrichards22,

    sorry, no idea about that behaviour or how to overcome this in the starting code (neither have a sample of a textfile to import nor the complete code). The import of a textfile and text functions for working on the contents should be respnonsible for this result but I canīt show an alternative to what you have (you have a couple of different ways to work around this by now).

    Ciao,
    Holger

  11. #11
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    334

    Re: Delete special blank cells not recognising blank cells

    Holger,

    The code is what I have posted. Find and replace that's it!
    I then manually input the Substitute/Trim formulae.

    As I have stated, I cannot post actual data because it is confidential & I assume it would be pointless posting dummy data because it may not give the desired outcome.

    Thanks for your solution, I just asked an additional question so as to improve my VBA knowledge.

+ 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. Replies: 2
    Last Post: 07-25-2013, 01:01 PM
  2. Replies: 3
    Last Post: 07-14-2013, 03:00 PM
  3. Replies: 5
    Last Post: 02-18-2012, 04:40 AM
  4. Excel 2007 : Remove blank cells (special)
    By xchaos01 in forum Excel General
    Replies: 11
    Last Post: 04-13-2011, 07:22 AM
  5. Copy down - special to fill only the blank cells
    By Mike in forum Excel General
    Replies: 3
    Last Post: 04-18-2005, 06:06 PM

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