+ Reply to Thread
Results 1 to 12 of 12

Find empty cell in column and delete that row

  1. #1
    Registered User
    Join Date
    06-20-2013
    Location
    Bratislava
    MS-Off Ver
    MS EXCEL 2021
    Posts
    90

    Find empty cell in column and delete that row

    Hi all,

    I would like to take advice.

    I would like to search in column "B" all cells, if will be empty cell, then, delete full row, where is this cell

    or

    Maybe more complicated.

    Search column "B" and if there will be empty cell, write to this cell same value which is exactly above this cell.


    2nd way will be helpfull for me.

    thanks
    Last edited by xbr088; 06-26-2013 at 03:35 AM.

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

    Re: Find empty cell in column and delete that row

    Hi, xbr088,

    maybe
    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

  3. #3
    Registered User
    Join Date
    06-20-2013
    Location
    Bratislava
    MS-Off Ver
    MS EXCEL 2021
    Posts
    90

    Re: Find empty cell in column and delete that row

    Hi Hohabe, great, again fully functional. thanks.

    But could you mention also about 1st case : means find empty cell and delete row ?

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

    Re: Find empty cell in column and delete that row

    Hi, xbr088,

    what about

    Please Login or Register  to view this content.
    Ciao,
    Holger

  5. #5
    Registered User
    Join Date
    06-20-2013
    Location
    Bratislava
    MS-Off Ver
    MS EXCEL 2021
    Posts
    90

    Re: Find empty cell in column and delete that row

    Hi Hahobe, what does it means "On Error Resume Next" ?

    Macro is fully functional

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

    Re: Find empty cell in column and delete that row

    Hi, xbr088,

    to be honest: the worst of all error handlers possible. Any error that occurs will not get noted, the code goes on as if nothing has happend. This may lead to very strange results and very different outcomes from the expected if values arenīt filled the proper way.

    Within the small macro here it just tells VBA to go on if no empty cells are to be found in the given range (otherwise an error would break the code execution and show up a message).

    Ciao,
    Holger

  7. #7
    Registered User
    Join Date
    06-20-2013
    Location
    Bratislava
    MS-Off Ver
    MS EXCEL 2021
    Posts
    90

    Re: Find empty cell in column and delete that row

    Maybe, when didnt found any row with empty cell for delete, in that time debug windows will occurs and that "on error resume next" dispetch prevent this debug popup.

  8. #8
    Registered User
    Join Date
    06-20-2013
    Location
    Bratislava
    MS-Off Ver
    MS EXCEL 2021
    Posts
    90

    Re: Find empty cell in column and delete that row

    Wrote messages in similar time. And what about some next rows in macro? are they influenced by this also? it means dont need to know some others debug popups ? (maybe from below functions?)
    Last edited by xbr088; 06-26-2013 at 03:07 AM.

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

    Re: Find empty cell in column and delete that row

    Hi, xbr088,

    And what about some next rows in macro? will it have influence to all what is below ?
    Definitely as no error handling takes place.

    You may set back the error handling to VBA by using
    Please Login or Register  to view this content.
    If you want to implement the small code into a larger one you may use something like
    Please Login or Register  to view this content.
    Ciao,
    Holger

  10. #10
    Registered User
    Join Date
    06-20-2013
    Location
    Bratislava
    MS-Off Ver
    MS EXCEL 2021
    Posts
    90

    Re: Find empty cell in column and delete that row

    Yes, now i understand.

    Is functional, and really now i can see, if there was not any row deleted.

    Thanks for help.

    PS: Hahobe, are you developing excel or you know everything about VBA?

  11. #11
    Registered User
    Join Date
    06-20-2013
    Location
    Bratislava
    MS-Off Ver
    MS EXCEL 2021
    Posts
    90

    Re: Find empty cell in column and delete that row

    Yes, now i understand.

    Is functional, and really now i can see, if there was not any row deleted.

    Thanks for help.

    PS: Hahobe, are you developing excel or you know everything about VBA?

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

    Re: Find empty cell in column and delete that row

    Hi, xbr088,

    are you developing excel
    If somebody comes and asks for an application I may do so (but certainly could not make a living of that). Mostly Iīm trying to help people in Forums (most recently mostly this one).

    you know everything about VBA
    Not as much as I wish to know - especially not with the newer versions from 2007 on.

    Ciao,
    Holger

+ 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