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: 4
Default Date problem

Hi all,

Im having a weird problem with the code im using. The code is as follows

For ArrayRow = 0 To VarCount
SalesCount = 0
UserRow = varData(ArrayRow)
For NowRow = 2 To LastRow
SheetDate = Cells(NowRow, 3).Value
If FirstDate <= SheetDate And LastDate = SheetDate Then

If UserRow = Cells(NowRow, 4).Value Then
SalesCount = SalesCount + 1
End If
If Row = LastRow Then
Sheets("SalePerson").Cells(CurrentSheetRow, 1).Value = UserRow
Sheets("SalePerson").Cells(CurrentSheetRow, 2).Value =
SalesCount
CurrentSheetRow = CurrentSheetRow + 1
End If
End If
Next NowRow
Next ArrayRow

Now the idea of this code is to index through a list of sales and if each
member of the team if the row in question is between the start date and the
finnish date and the user in question it will add one to SalesCount. Then on
the last run for each user it will add the information to the SalePerson
sheet.

An example of the data i use is:

OrderID CustomerID Date Sales Person
10000 1000 03/05/04 oadmin
10001 1000 03/05/04 oadmin
10003 1000 05/06/04 oadmin
10004 1000 05/07/04 Jammie
10005 1000 05/08/04 Bob
10006 1000 08/05/04 oadmin


If i run that data through the code it seems to skip the first two rows and
carries on from the third.

Thanks for any help in advance

Jamie


 
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
Date problem Saylindara New Users to Excel 4 September 21st 08 09:27 AM
Exel increment date problem wrt todays date. [email protected] Excel Worksheet Functions 1 November 11th 07 06:58 PM
Date Formula Problem - Leave date blank if Null Gayla Excel Worksheet Functions 5 April 24th 07 09:42 PM
Date problem! liamsdad Excel Discussion (Misc queries) 3 June 17th 06 02:27 AM
Date Problem !! cassy01 Excel Discussion (Misc queries) 1 October 4th 05 11:17 PM


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