anarchyflag
New Member
- Joined
- Nov 2, 2018
- Messages
- 15
I have some code that I want to check every cell in in the range “A3:AAA3” for a specific text. If the cell contains that text, I want it to copy the text in the cell on the right, to two rows above (see below for illustration):
The copied text will be a date. This is what I have so far:
It’s not coming up with an error message, it’s just not doing anything. Have I missed something?
The copied text will be a date. This is what I have so far:
VBA Code:
Sub Weeks_commencing()
Dim c As Range
For Each c In ThisWorkbook.Worksheets("Sheet1").Range("A3:AAA3").Cells
If c.Value Like "*TEXT*" Then
c.Offset(ColumnOffset:=1).Copy Destination:=c.Offset(RowOffset:=-2)
End If
Next c
End Sub
It’s not coming up with an error message, it’s just not doing anything. Have I missed something?