• 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.

Deleting Empty ROWS - Between 2 worksheets

fundi

New Member
I have AUTOMATICALLY Copied 3 COLUMNS from Worksheet 1 to Worksheet 2. Whatever I input in these 3 COLUMNS of Worksheet 1 , is copied into Worksheet 2.

PROBLEM-
There are LOTS OF EMPTY ROWS being created in the WORKSHEET 2.

Any solution please ?
 

Attachments

  • Dailys-question.xlsx
    13.1 KB · Views: 4
Turn your data into a table > CTRL-T (Yes to headers)

60125

Date Tab >> Get Data from Table

60127

Select Sales Date Pull Down and deselect 0

60128

Close and Load

60129

Done:

60130

Takes about 10 seconds... (maybe :p )

Keep Calm and XL ON !!
 
Or a VBA solution:
Code:
Option Explicit

Sub DelRows()
    Dim i As Long, lr As Long
    lr = Range("F" & Rows.Count).End(xlUp).Row
    For i = lr To 2 Step -1
        If Range("F" & i) = "" Then
            Range("F" & i).EntireRow.Delete
        End If
    Next i

End Sub
 
Turn your data into a table > CTRL-T (Yes to headers)

View attachment 60125

Date Tab >> Get Data from Table

View attachment 60127

Select Sales Date Pull Down and deselect 0

View attachment 60128

Close and Load

View attachment 60129

Done:

View attachment 60130

Takes about 10 seconds... (maybe :p )

Keep Calm and XL ON !!
Thank you sooo much ! :D

Btw, whats the advantage of creating a TABLE ?
I just figured, I can directly goto FILTER and un-select the items not needed...
 
Back
Top