LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Help needed with macro

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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Macro needed to set macro security in Excel to minimum Carl Excel Programming 3 March 18th 06 03:36 PM
help with a macro needed bill gras Excel Programming 3 October 3rd 05 11:22 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM


All times are GMT +1. The time now is 05:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"