I got no error with the line below where I copy the values from one range to another:
ThisWorkbook.Sheets("Output").Range("F" & lastRowOutput + 1 & ":" & "M" & lastRowOutput + 1).Value = projectWb.Sheets("Beställningar").Range("B" & row & ":" & "I" & row).Value
But when I try to do the same with the NumberFormat I get an error message:
ThisWorkbook.Sheets("Output").Range("F" & lastRowOutput + 1 & ":" & "M" & lastRowOutput + 1).NumberFormat = projectWb.Sheets("Beställningar").Range("B" & row & ":" & "I" & row).NumberFormat
What I really want to achieve is to copy values from one range to another, and retain the text values as text and number values as numbers.
You can get the general idea by simply recording a macro:
Try this one: