Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: VBA to delete blank cells and duplicates in different work sheet

  1. #1
    New Member
    Join Date
    Feb 2014
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default VBA to delete blank cells and duplicates in different work sheet

    Hi,

    I tried the following code and it worked ok. But I want the results on a different worksheet, ie sheet2, in the same book.
    I also want to apply this only on the specific two columns F and G.(I want to leave the other columns as they are)

    regards,
    Listter


    Sub RemoveNoise() Dim lngLastRow As Long Rows(1).Insert lngLastRow = Range("A" & Rows.Count).End(xlUp).Row With Range("B1:B" & lngLastRow) .Formula = "=COUNTIF($A$1:A1,A1)" .AutoFilter 1, "<>1" End With With Rows("1:" & lngLastRow) .SpecialCells(xlCellTypeVisible).Clear .Rows("1:" & lngLastRow).Sort Range("A1"), xlAscending End With Columns("B").Clear End Sub

  2. #2
    Board Regular
    Join Date
    Sep 2008
    Posts
    505
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA to delete blank cells and duplicates in different work sheet

    Hi, copy both columns to sheet 2 and:
    Delete Blank Rows in Excel, Remove Blank Cells in Excel | Chandoo.org - Learn Microsoft Excel Online
    You can do it with the macro recorder on and will get your macro.

  3. #3
    New Member
    Join Date
    Feb 2014
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: VBA to delete blank cells and duplicates in different work sheet

    Thanks.
    Sorry, I forgot to add one more thing. I want to begin from the row 10, I think using xlshiftdown code... like attached.

    View image: 161883

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •