E
Eucalypta
Dear All,
I kindly seek your assistance for the following:
Col B. Col. E Col.F Col.G Col.L Col.Q
Date Art# Pcs Price Order#
Formula(=IF(AND(B45<NOW()-60;L45="");"Alarm!!!";"").
To copy data that meets the criteria (today-60 days and col. L empty) I have
a macro:
Sub moveitems()
With Sheets("Sheet1")
OldRowCount = 5
NewRowCount = 3
Do While .Range("B" & OldRowCount) <> ""
If IsDate(.Range("B" & OldRowCount)) Then
If (Date - .Range("B" & OldRowCount)) > 60 And _
.Range("L" & OldRowCount) = "" Then
.Range("E" & OldRowCount & ":H" & OldRowCount).Copy _
Destination:=Sheets("Sheet2").Range("A" & NewRowCount)
NewRowCount = NewRowCount + 1
End If
End If
OldRowCount = OldRowCount + 1
Loop
End With
End Sub
My problem is that after a few rows, the macro stops. It does not seem to
check all 1024 rows. Why?
Awaiting your kind reply,
Kind regards,
Eucalypta
I kindly seek your assistance for the following:
Col B. Col. E Col.F Col.G Col.L Col.Q
Date Art# Pcs Price Order#
Formula(=IF(AND(B45<NOW()-60;L45="");"Alarm!!!";"").
To copy data that meets the criteria (today-60 days and col. L empty) I have
a macro:
Sub moveitems()
With Sheets("Sheet1")
OldRowCount = 5
NewRowCount = 3
Do While .Range("B" & OldRowCount) <> ""
If IsDate(.Range("B" & OldRowCount)) Then
If (Date - .Range("B" & OldRowCount)) > 60 And _
.Range("L" & OldRowCount) = "" Then
.Range("E" & OldRowCount & ":H" & OldRowCount).Copy _
Destination:=Sheets("Sheet2").Range("A" & NewRowCount)
NewRowCount = NewRowCount + 1
End If
End If
OldRowCount = OldRowCount + 1
Loop
End With
End Sub
My problem is that after a few rows, the macro stops. It does not seem to
check all 1024 rows. Why?
Awaiting your kind reply,
Kind regards,
Eucalypta