Hi all,
I have some code that selects a named range and then copies it to a location, is it possible to select the named range but just copy the first 18 rows x 2 columns out of it, so if the named range dimension was 18x4 just copy the contents of the named from columns A & B and paste to location. I would also need to copy the code to another module where in that instance it would copy the contents of the named range from columns C & D.
Any ideas?, Here's the code im using to select the named range,
Regards,
Simon
Sub datachange()
Sheets("User Data").Visible = True
Application.Goto Reference:=Range("B3").Value
Selection.Copy
Sheets("Data View").Select
Range("B5").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("User Data").Activate
ActiveWindow.SelectedSheets.Visible = False
Sheets("Data View").Select
Range("A1").Select
Exit Sub
End Sub
Bookmarks