Solution for I want to Input Data in One sheet and move data in another sheet automatically.
Try this..
Sub testing()
Dim shcount As Long
Dim sh As Worksheet
Dim Rcount As Long
shcount = ThisWorkbook.Sheets.Count
Set sh = ThisWorkbook.Sheets(1)
For i = 2 To shcount
sh.Range("b1").AutoFilter field:=2, Criteria1:=Sheets(i).Name
Rcount = Sheets(i).Cells(Rows.Count, 1).End(xlUp).Row + 1
sh.Range("A1:f1").Copy Destination:=Sheets(i).Range("A1")
sh.Range(Range("A1").Offset(1), Range("A1").CurrentRegion.SpecialCells(xlCellTypeVisible).SpecialCells(xlCellTypeLastCell)). _
Copy Destination:=Sheets(i).Range("A2")
Next i
sh.AutoFilterMode = False
End Sub
Attachment | Size |
---|---|
Query Ans.xlsm | 24.44 KB |
Recent comments
5 years 36 weeks ago
6 years 22 weeks ago
6 years 34 weeks ago
6 years 37 weeks ago
6 years 38 weeks ago
6 years 43 weeks ago
6 years 52 weeks ago
7 years 2 days ago
7 years 3 days ago
7 years 3 days ago