Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Array code ?


See if this helps. I don't know whqt the reference to Row 28 means.
Modify code as required.


Sub filterData()

NewRow = 1
With Sheets("Sheet1")
LastRow = Range("B" & Rows.Count).End(xlUp).Row
For RowCount = 1 To LastRow
ColE = .Range("E" & RowCount)
If ColE = "A" Or ColE = "B" Then

MyDate = .Range("B" & RowCount)
If Weekday(Date) = vbSaturday Then
If MyDate = Date And MyDate <= (Date + 3) Then
CopyData = True
Else
CopyData = False
End If
Else
If MyDate = Date And MyDate <= (Date + 1) Then
CopyData = True
Else
CopyData = False
End If
End If

If CopyData = True Then
.Range("D" & RowCount).Copy _
Destination:=Sheets("Sheet2").Range("A" & NewRow)
NewRow = NewRow + 1
End If
End If
Next RowCount
End With

End Sub


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=149840

Reply
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
help with code and array calcs Matt S Excel Programming 2 February 8th 09 10:16 PM
Array Formulas + VB Code [email protected] Excel Programming 2 March 20th 07 08:08 PM
code for organizing array [email protected] Excel Programming 1 October 18th 05 01:00 PM
Help With Code - Array and Range Sandy Excel Programming 8 September 2nd 05 01:09 AM
Simplifying code using array John Pierce Excel Programming 3 December 15th 03 03:17 AM


All times are GMT +1. The time now is 06:41 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"