I need help. I want to be able to copy data from a table in worksheet1(Register) to another worksheet (either "rent" or "utilities" based on the value in cell I14. My code opens the appropriate worksheet, but I can't seem to get the data to copy to cells in the destination worksheet. I have multiple cells to copy and too. I also want to print two copies after the data is pasted. Any assistance will be appreciated.
.
Sub CopyDataRent()
'Copy the data
If Range("I14") = "Rent" Then
Sheets("Rent").Select
Sheets("Rent").Name = "Rent"
Range("E11").Copy
'Select the target range
Range("B11").Select
'Paste in the target destination
ActiveSheet.Paste
Application.CutCopyMode = False
End If
End Sub
Sub CopyDataUtilities()
'Copy the data
If Range("I14") = "Utilities" Then
Sheets("Utilities").Select
Sheets("Utilities").Name = "Utilities"
Range("E11").Copy
'Select the target range
Range("B11").Select
'Paste in the target destination
ActiveSheet.Paste
Application.CutCopyMode = False
End If
End Sub
.
Sub CopyDataRent()
'Copy the data
If Range("I14") = "Rent" Then
Sheets("Rent").Select
Sheets("Rent").Name = "Rent"
Range("E11").Copy
'Select the target range
Range("B11").Select
'Paste in the target destination
ActiveSheet.Paste
Application.CutCopyMode = False
End If
End Sub
Sub CopyDataUtilities()
'Copy the data
If Range("I14") = "Utilities" Then
Sheets("Utilities").Select
Sheets("Utilities").Name = "Utilities"
Range("E11").Copy
'Select the target range
Range("B11").Select
'Paste in the target destination
ActiveSheet.Paste
Application.CutCopyMode = False
End If
End Sub