Hi,
Im adding data to sheets by copying and pasting data based on an offset function. If you see below im copying and pasting the code and then changing the column that the data taking from (in bold). Is there a quick way of coding the following rather then copying and pasting and just changing the number in bold.
Many Thanks
.End(xlToRight).Offset(0, 1) = _
Sheets("data").Cells(Range("rownum"), 4)
.End(xlToRight).NumberFormat = "0"
'Once next quarter of data added this
'becomes end of row, so offset by one cell
.End(xlToRight).Offset(0, 1) = _
Sheets("data").Cells(Range("rownum"), 5)
.End(xlToRight).NumberFormat = "0"
.End(xlToRight).Offset(0, 1) = _
Sheets("data").Cells(Range("rownum"), 6)
.End(xlToRight).NumberFormat = "0"
.End(xlToRight).Offset(0, 1) = _
Sheets("data").Cells(Range("rownum"), 7)
.End(xlToRight).NumberFormat = "0"
Im adding data to sheets by copying and pasting data based on an offset function. If you see below im copying and pasting the code and then changing the column that the data taking from (in bold). Is there a quick way of coding the following rather then copying and pasting and just changing the number in bold.
Many Thanks
.End(xlToRight).Offset(0, 1) = _
Sheets("data").Cells(Range("rownum"), 4)
.End(xlToRight).NumberFormat = "0"
'Once next quarter of data added this
'becomes end of row, so offset by one cell
.End(xlToRight).Offset(0, 1) = _
Sheets("data").Cells(Range("rownum"), 5)
.End(xlToRight).NumberFormat = "0"
.End(xlToRight).Offset(0, 1) = _
Sheets("data").Cells(Range("rownum"), 6)
.End(xlToRight).NumberFormat = "0"
.End(xlToRight).Offset(0, 1) = _
Sheets("data").Cells(Range("rownum"), 7)
.End(xlToRight).NumberFormat = "0"