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 45 weeks ago
6 years 31 weeks ago
6 years 43 weeks ago
6 years 46 weeks ago
6 years 47 weeks ago
7 years 6 days ago
7 years 8 weeks ago
7 years 9 weeks ago
7 years 9 weeks ago
7 years 9 weeks ago