Hello,
I have to be honest: I am quite new to VBA and I copied a macro trying to adapt it to my needs.
My problem: in column A there is the whole year, in the next cells there are a series of data.
I need to copy the cells next to today's date to another sheet.
In this case I copy the specific cell, how can I set a range of cells instead?
I have to be honest: I am quite new to VBA and I copied a macro trying to adapt it to my needs.
My problem: in column A there is the whole year, in the next cells there are a series of data.
I need to copy the cells next to today's date to another sheet.
VBA Code:
Sub selectdata()
Dim nextrow As Long
For Row = 4 To 368
If Worksheets("SHEET1").Cells(Row, 1).Value = Date Then
Worksheets("SHEET1").Cells(Row, 1).Copy
Worksheets("SHEET2").Activate
nextrow = Range("A65536").End(xlUp).Row
Cells(nextrow, 1).Select
ActiveSheet.Paste
End If
Next Row
Worksheets("SHEET1").Select
End Sub
In this case I copy the specific cell, how can I set a range of cells instead?