First thing to note is that you should never use .Select
in Excel Vba. You really need to learn how to use With
etc
Second thing to note is that you need to recreate this issue. Go and follow the macro that you recorded and find the issue there
Because your code came from a Macro Record, it is very choppy and bad. You should never select multiple cell types and paste in vba
Third thing to mention now, is that you likely wont need to "Copy+Paste" - this makes mountains of issues if you make your code long enough to run and do other things (want to copy a link in Chrome, boom, your whole script has broken)
Step 1: follow the below format to start off with your macros.
Step 2: Think about what you want your code to do, and what limitations you have
Step 3: Then ask for help - when you have a MCVE
Sub Base()
Dim wb As Workbook, ws As Worksheet, rng As Range
Set wb = ThisWorkbook
Set ws = Worksheets("Sheet1")
Set rng = 'whatever you want
With rng
'Here you would copy your range
End With
'Here you would paste/move your range
End Sub
Naming a range:
Dim rngName As String, rngB As Range
rngName = "NamedRangeExample"
Set rngB = ws2.Range("A5:C10")
wb.Names.Add Name:=rngName, RefersTo:=rng2