Davealot
Member
Greetings, I'm using the following code:
The problem, as I'm sure you can see but I cannot is that it's not checking cell A2, looking for a date and adding one day to it, and cutting out the information that I need. I've attached spreadsheet that I'm working on as well. I just need it to cut out tomorrow's information. Any help would be greatly appreciated thanks ladies/gents.
Code:
Option Explicit
Sub beepbeepbeep()
'
' beepbeepbeep Macro
'
'
Range("A:A,C:C,D:D,E:E,G:G,H:H,I:I,K:K").Select
Range("K1").Activate
Selection.Delete Shift:=xlToLeft
Columns("A:A").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("D:D").Select
Selection.Cut Destination:=Columns("A:A")
Columns("D:D").Select
Selection.Delete Shift:=xlToLeft
Dim CurrRow As Integer
Range("A2").Select
Do Until IsEmpty(ActiveCell)
If ActiveCell = IsDate + 1 Then
CurrRow = ActiveCell.Row
Range("A" & CurrRow & ":D" & CurrRow).Copy
Range("G" & Cells(Rows.Count, "G").End(xlUp).Offset(1, 0).Row).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("A" & CurrRow & ":D" & CurrRow).Select
Selection.Delete Shift:=xlUp
Range("A" & CurrRow).Select
Else
ActiveCell.Offset(1, 0).Select
End If
Loop
Range("A:A,B:B,C:C,D:D,E:E,F:F").Select
Selection.Delete Shift:=xlToLeft
Range("A1").Select
End Sub
The problem, as I'm sure you can see but I cannot is that it's not checking cell A2, looking for a date and adding one day to it, and cutting out the information that I need. I've attached spreadsheet that I'm working on as well. I just need it to cut out tomorrow's information. Any help would be greatly appreciated thanks ladies/gents.
Attachments
Last edited by a moderator: