I'm trying to create a form in Excel to sort from the form and take the data
to another worksheet.
I am very new to this and any help would be appreciated.
I have a value in a cell that will direct what sheet I want the cells copied
to, so I thought I could use an If statement but have been unable to right
the code properly, ie...
If "f2" = 1 Then
Sheets("XX1").S elect
Range("A2").Sel ect
ActiveSheet.Pas te
Else
If "f2" = 2 Then
Sheets("XX2").S elect
Range("A2").Sel ect
ActiveSheet.Pas te
Else
If "f2" = 3 Then
Sheets("XX3").S elect
Range("A2").Sel ect
ActiveSheet.Pas te
Else
If "f2" = 4 Then
Sheets("XX4").S elect
Range("A2").Sel ect
ActiveSheet.Pas te
Else
If "f2" = 5 Then
Sheets("XX5").S elect
Range("A2").Sel ect
ActiveSheet.Pas te
End If
to another worksheet.
I am very new to this and any help would be appreciated.
I have a value in a cell that will direct what sheet I want the cells copied
to, so I thought I could use an If statement but have been unable to right
the code properly, ie...
If "f2" = 1 Then
Sheets("XX1").S elect
Range("A2").Sel ect
ActiveSheet.Pas te
Else
If "f2" = 2 Then
Sheets("XX2").S elect
Range("A2").Sel ect
ActiveSheet.Pas te
Else
If "f2" = 3 Then
Sheets("XX3").S elect
Range("A2").Sel ect
ActiveSheet.Pas te
Else
If "f2" = 4 Then
Sheets("XX4").S elect
Range("A2").Sel ect
ActiveSheet.Pas te
Else
If "f2" = 5 Then
Sheets("XX5").S elect
Range("A2").Sel ect
ActiveSheet.Pas te
End If
Comment