Here is what I am trying to do.
Select a range and then according to what type of injurytype go to the appropiate tab and then offset by using a range that gives the horizontal offset and down 1 and pasting the selected range in that cell (array).
NumRange = the data to be copied and pasted
offsetcnt = the horizontal offset
Range("NumRange").Copy
If Sheets("AllStates").Range("B2") = "PT" Then
Sheets("PT").Range("A1").Offset(Range("offsetcnt").Value, 1).Select
Selection.PasteSpecial Paste:=xlPasteValues
ElseIf Sheets("AllStates").Range("B2") = "PP" Then
Sheets("PP").Range("A1").Select
Selection.Offset(Range("Offsetcnt").Value, 1).Select
Selection.PasteSpecial Paste:=xlPasteValues
ElseIf Sheets("AllStates").Range("B2") = "One_IT" Then
Sheets("One_IT").Range("A1").Select
Selection.Offset(Range("Offsetcnt").Value, 1).Select
Selection.PasteSpecial Paste:=xlPasteValues
End If
I am getting an error on my selection process.
Thanks in advanced
Dave
Select a range and then according to what type of injurytype go to the appropiate tab and then offset by using a range that gives the horizontal offset and down 1 and pasting the selected range in that cell (array).
NumRange = the data to be copied and pasted
offsetcnt = the horizontal offset
Range("NumRange").Copy
If Sheets("AllStates").Range("B2") = "PT" Then
Sheets("PT").Range("A1").Offset(Range("offsetcnt").Value, 1).Select
Selection.PasteSpecial Paste:=xlPasteValues
ElseIf Sheets("AllStates").Range("B2") = "PP" Then
Sheets("PP").Range("A1").Select
Selection.Offset(Range("Offsetcnt").Value, 1).Select
Selection.PasteSpecial Paste:=xlPasteValues
ElseIf Sheets("AllStates").Range("B2") = "One_IT" Then
Sheets("One_IT").Range("A1").Select
Selection.Offset(Range("Offsetcnt").Value, 1).Select
Selection.PasteSpecial Paste:=xlPasteValues
End If
I am getting an error on my selection process.
Thanks in advanced
Dave