gr8trthanu72
New Member
- Joined
- Nov 15, 2013
- Messages
- 31
Good Day,
I am currently using VBA code to move data from a sheet called "Issues Line/ws1" with up to 50 rows to another sheet called "Issues Log/ws2" using the code below.
The code would copy and paste the data into "Issues Log/ws2" starting in column C. The data is copied and pasted to the next available row on the Issues Log sheet. Every time a row is copied and pasted I would like the date inserted into column A of the same line and remain static. I have searched for solutions but have failed to find any.
the code below inserts the date but it updates every time the file is opened. As well, I only copy over 50 rows maximum at a time but after two macros I could have 100 lines so the A50 wont work
If ws1.Range("B50").Value <> "-" Then
DestRow = ws2.Cells(Rows.Count, "C").End(xlUp).Row + 1
'ws2.Range("A50").Value = Now
ws1.Range("B50:J50").Copy
ws2.Range("C" & DestRow).PasteSpecial Paste:=xlPasteValues
ws2.Range("A50").Value = Now
End If
Thank YOu in advance
I am currently using VBA code to move data from a sheet called "Issues Line/ws1" with up to 50 rows to another sheet called "Issues Log/ws2" using the code below.
The code would copy and paste the data into "Issues Log/ws2" starting in column C. The data is copied and pasted to the next available row on the Issues Log sheet. Every time a row is copied and pasted I would like the date inserted into column A of the same line and remain static. I have searched for solutions but have failed to find any.
the code below inserts the date but it updates every time the file is opened. As well, I only copy over 50 rows maximum at a time but after two macros I could have 100 lines so the A50 wont work
If ws1.Range("B50").Value <> "-" Then
DestRow = ws2.Cells(Rows.Count, "C").End(xlUp).Row + 1
'ws2.Range("A50").Value = Now
ws1.Range("B50:J50").Copy
ws2.Range("C" & DestRow).PasteSpecial Paste:=xlPasteValues
ws2.Range("A50").Value = Now
End If
Thank YOu in advance