prasadyanz
New Member
- Joined
- Oct 21, 2013
- Messages
- 17
i am copy pasting a table , with a variable , i want rename the new worksheet in the name of the variable
for example
Sub Tp6s()
Sheets("Sheet1").Select
Dim i As Range
For Each i In Range("d5:d1000")
If i.Value = Sheets("Pre-processing").Range("N10") Then
i.Select
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Copy
Sheets.Add After:=Sheets(Sheets.Count)
Sheets("i").Range("A65000").End(xlUp).Offset(1, 0).PasteSpecial
End If
Next i
End Sub
if i run this , im getting a error, im not able to solve this issue. help me please
thanks
for example
Sub Tp6s()
Sheets("Sheet1").Select
Dim i As Range
For Each i In Range("d5:d1000")
If i.Value = Sheets("Pre-processing").Range("N10") Then
i.Select
ActiveCell.Rows("1:1").EntireRow.Select
Selection.Copy
Sheets.Add After:=Sheets(Sheets.Count)
Sheets("i").Range("A65000").End(xlUp).Offset(1, 0).PasteSpecial
End If
Next i
End Sub
if i run this , im getting a error, im not able to solve this issue. help me please
thanks