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 41 weeks ago
6 years 27 weeks ago
6 years 39 weeks ago
6 years 42 weeks ago
6 years 43 weeks ago
6 years 48 weeks ago
7 years 4 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago