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

Moving data based on Cell value

mohan08

Member
Hi All,

Can you help with the attached macro.

Trying to move data based on column C to the respective sheet. i have tried below code but its not working.
need to move data for 10+ sheets
 

Attachments

  • Chandoo_Help_.xlsm
    15.6 KB · Views: 7
Hi, according to your attachment a VBA demonstration for starters like any Excel beginner can operate manually :​
Code:
Sub Demo1()
    Dim S&
        Application.ScreenUpdating = False
    With Sheet1.[A1].CurrentRegion
       .Range("K1") = .Range("C1")
    For S = 2 To Worksheets.Count
        Worksheets(S).UsedRange.Clear
       .Range("K2") = Worksheets(S).Name
       .AdvancedFilter 2, .Range("K1:K2"), Worksheets(S).[A1]
    Next
       .Range("K1:K2").Clear
    End With
        Application.ScreenUpdating = True
End Sub
Do you like it ? So thanks to click on bottom right Like !
 
Back
Top