Ok I have another separate macro in the same sheet that runs all the time i don't know if it is affecting it.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim LastRw As Long, ThisRw As Long
LastRw = Range("A" & Rows.Count).End(xlUp).Row
If Intersect(ActiveCell, Range("A2:M" & LastRw)) Is Nothing Then
Range("O6:N8,O10:O15,R10:R15").ClearContents
Else
ThisRw = ActiveCell.Row
Range("O6:O8").Value = Application.Transpose(Cells(ThisRw, "B").Resize(, 3).Value)
Range("O10:O13").Value = Application.Transpose(Cells(ThisRw, "E").Resize(, 4).Value)
Range("R10:R13").Value = Application.Transpose(Cells(ThisRw, "J").Resize(, 4).Value)
Range("O15").Value = Application.Transpose(Cells(ThisRw, "I").Resize(, 1).Value)
End If
End Sub
I keep getting "Runtime error '1004,:
This operation is not allowed. The operation is attempting to shift cells in a table on your worksheet.
Thanks
K