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

Help in VBA Macro Correction in coding

Hi Team,

I built a data allocation on a VBA Macro file, i need help on 2 criteria.

1. in chemical sheet column named "Hierarchy" begins with "10" data should available but iam getting multiple need to correct.
2. in non chemical sheet column named "Hierarchy" begins with "10" should be deleted.

Pls help on same

enclosed sample file.

Thanks
Jawahar
 

Attachments

  • TEST.xlsm
    794.2 KB · Views: 3
Hi, for your #2 according to your attachment a VBA demonstration for starters :​
Code:
Sub Demo2()
        Const C = "10*", H = 50
    With Sheet2.UsedRange.Columns
        If Application.CountIf(.Item(H), C) = 0 Then Exit Sub
        Application.ScreenUpdating = False
       .Item(H).AutoFilter 1, C
       .Offset(1).EntireRow.Delete
       .AutoFilter
    End With
        Application.ScreenUpdating = True
End Sub
Do you like it ? So thanks to click on bottom right Like !
 
Back
Top