• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

formula or vba to delete a database of empty rows but some have unneeded data at ends of rows

RAM72

Member
Hi Guys

Need help have to delete uneven alternate empty rows column J AND K which have data I i d'ont need.

Need formula or vba to del empty rows as sample file where the empty rows are highlighted in yellow and unneeded data in red and so on for all empty rows

thanks in advance for help
RAM
 

Attachments

  • sampletstrow1.xlsx
    27.5 KB · Views: 6
Hi Ram72

What rows need to be deleted. I can't see any difference between the rows you have highlighted and the others in your file. Is it all rows which have an empty cell?

What is the difference between Row 6 and row 13? How are we meant to differentiate the two. Clarity required.

Take care

Smallman
 
Hi Smallman

I have highlighted all blank rows but in column J subtotal hscode you will notice data and next his neighbour data also k column that is J5 and K5 as example .I need to get rid of these and notice that row is blank except j5 and k5 as highlighted. the others are same where highlighted .need vba or formula to get rid of these .see annexed file which is more explicit.however note that the true data base are not highlighted.

I hide column e,f,g,h,i to make it more easy to understand


Many thanks

RAM72
 

Attachments

  • sampletstrow1.xlsx
    28.1 KB · Views: 6
Hi Ram72

Your latest file shows more forethought and is easier to understand.

A formula can't delete VBA. I would recommend you put a filter on Column Q and filter for Blanks then simply delete the rows in your filter. This is quick and requires no code.

If you must have code then the following.

Code:
Sub GetRid()
    Range("Q:Q").SpecialCells(4).EntireRow.Delete
End Sub

The above should get you started.

Take care

Smallman
 
Back
Top