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 34 weeks ago
6 years 20 weeks ago
6 years 32 weeks ago
6 years 35 weeks ago
6 years 36 weeks ago
6 years 42 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago