+ Reply to Thread
Results 1 to 18 of 18

Deleting entire row if any specific column is blank

  1. #1
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Deleting entire row if any specific column is blank

    Hi,

    I am looking for a macro/vba module to delete a entire blank row if from A7 onwards if it is blank.In my enclosed workbook,A10 is blank,hence I want to delete the entire row,Similarly A12,A14.I have shown only few data here as more than 10k data is there which I cannot delete each row manually,since it is time consuming.

    Thanx in advance.
    Attached Files Attached Files
    Last edited by paradise2sr; 09-20-2017 at 08:32 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,897

    Re: Deleting entire row if any specific column is blank

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Deleting entire row if any specific column is blank

    Another one :
    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  4. #4
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Deleting entire row if any specific column is blank

    Thanks all of you for your kind help.

    Further to add,Suppose there are more data till I column.Now,if H7+I7,if both cells are blank,then it should delete entire row of 7th.Similarly if H8+I8 both cells are blank,then it should delete entire 8th row subject to condition that if D7,D8 column contains the word "cancel" then it should not delete the row inspite of being blank in H & I specific cell position.

    I hope this will also be sought out.
    Last edited by paradise2sr; 09-20-2017 at 09:47 AM.

  5. #5
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Deleting entire row if any specific column is blank

    ok I think post # 4 seems to be not workable in deriving vba code by all of u.I am revising the posit #4 code.

    Further to add,Suppose there are more data till I column.Now,if H7+I7,if both cells are blank,then it should delete entire row of 7th.Similarly if H8+I8 both cells are blank,then it should delete entire 8th row.

    I hope this will ease further.

  6. #6
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Deleting entire row if any specific column is blank

    Upload a new workbook that reflects what you need in your new question, it is hard to predict what you want just by guessing from your words.

  7. #7
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Deleting entire row if any specific column is blank

    ok I think post # 4 seems to be not workable in deriving vba code by all of u.I am revising the posit #4 code.

    Further to add,Suppose there are more data till I column.Now,if H7+I7,if both cells are blank,then it should delete entire row of 7th.Similarly if H8+I8 both cells are blank,then it should delete entire 8th row.

    I hope this will ease further.

  8. #8
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Deleting entire row if any specific column is blank

    Using programming language (like VBA), everything can be programmed, including the scenario in post #4.
    What we really need is the !!!REAL!!! sample data with expected output, not just wording.
    Do you catch what I mean ? Upload a new sample workbook that reflect the new scenario on post #4 and the expected result.

  9. #9
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Deleting entire row if any specific column is blank

    Plz find the new file in the link >> https://docs.google.com/spreadsheets...it?usp=sharing
    Here if J+K column from 7th row onwards in respective cell if it does not contain data then it should delete that respective row taking into condition that B column does not contain "cancel".I have highlighted the row which is deleted in my expected result.My main raw data is "Data" sheet and expected output is "Expected Result".Rest are self explanatory.

  10. #10
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Deleting entire row if any specific column is blank

    Should be :
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Deleting entire row if any specific column is blank

    Thanx from the heart a lot.It did work.

    A slight change further is requested to be made in your code.Those entire data deleted permanently of respective rows can be made/extracted in a separate sheet.As this will help me in segregation of data which in reality is two different types.Sample I have reflected in the link mentioned in the post #9.

    Hoping for your kind help in this regard.

  12. #12
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Deleting entire row if any specific column is blank

    Should be :
    Please Login or Register  to view this content.

  13. #13
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,538

    Re: Deleting entire row if any specific column is blank

    Try
    Please Login or Register  to view this content.

  14. #14
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Deleting entire row if any specific column is blank

    That's an awesome work.
    The two results are fine.A last modification in the code would be further be appreciated ,if the existing result is received in two worksheet rather than replacing/modifying my original data which is currently replacing the original sheet which means -

    1st sheet - My original data (Currently replacing expected result 1).................I want this to be left intact
    2nd sheet- Expected Result 1...................Existing result is required in separate sheet which is replacing/modifiying in the original data itself.
    3rd sheet- Expected Result 2....................This is fine extracting from orginal data in a separate sheet

    Hope this could be done easily.

    Thanx both of you for your kind help in this regard.

  15. #15
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,538

    Re: Deleting entire row if any specific column is blank

    Formula changed
    Please Login or Register  to view this content.
    Last edited by jindon; 09-21-2017 at 10:47 PM.

  16. #16
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Deleting entire row if any specific column is blank

    Quote Originally Posted by jindon View Post
    So, you have not even tried my code.
    Oh! I used the first code and that worked perfectly.Hopefully,thought the same would be of yours.And requested a slight change in code which I have further posted in Post # 14 which you have already solved in Post #13 except the column width adjustment which is very simple to me.

    Thanx again to you as you were my favourite tutor in solving my complex large data case since inception.
    And thanx to "Karedog" &" alansidman" too who consistently helped in resolving the issue.

    Hence my issue is solved here.A similar format/Structure which is my next issue will be posting in few hours as I am facing in Normalisation of complex large data soon.And hoping the same help. there too with vba.
    Last edited by paradise2sr; 09-21-2017 at 10:57 PM.

  17. #17
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Deleting entire row if any specific column is blank

    Please Login or Register  to view this content.

  18. #18
    Forum Contributor
    Join Date
    03-11-2011
    Location
    Nepal
    MS-Off Ver
    MS Excel 2021 / 365
    Posts
    1,248

    Re: Deleting entire row if any specific column is blank

    Thanx it did work and hoping the same in forthcoming issue regarding normalisation of data.

+ 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] Deleting Rows where value in a specific column is blank (or a zero)
    By Bigmal70 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-18-2017, 11:25 AM
  2. Deleting rows if specific cell is blank or have specific text
    By JoaoFerreira1985 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-11-2013, 01:18 PM
  3. Macro for Deleting the entire row if first two columns are blank
    By Nithya1987 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-08-2011, 12:24 PM
  4. comparing the column headers, then deleting the entire column iif duplicates occur
    By vindieselgal in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-25-2011, 04:53 AM
  5. Deleting Entire Rows with specific text
    By pcoper114 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-20-2011, 09:33 AM
  6. Deleting entire customer entry if one cell is blank?
    By ocdmachine in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-24-2008, 08:24 PM
  7. Deleting Entire Rows Containing a Specific Value
    By Marcus Gee in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-14-2007, 08:22 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