Wizard
12-01-2008, 02:15 PM
I have a spreadsheet with data for multiple company branches. We are splitting the data into separate reports for each branch.
When creating a branch report, we first copy the worksheet to a new workbook, find the last entry for that branch, then delete any rows below that.
To find the last row of data for any given branch, we have always used this
(DestCol is the column number, Destination is the branch name):
Columns(DestCol).Find(What:=Destination, After:=Cells(65536, DestCol), _
LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlUp, MatchCase:=False).Select
and it has always worked fine under Excel 2000.
One member of our group just got a new laptop that has Excel 2003... and now that same line of code (which still works fine under 2000) doesn't find the last row of data for that branch, it finds the first! :wot
Can anyone offer any insight to why this may be happening?
Thx
Wizard
When creating a branch report, we first copy the worksheet to a new workbook, find the last entry for that branch, then delete any rows below that.
To find the last row of data for any given branch, we have always used this
(DestCol is the column number, Destination is the branch name):
Columns(DestCol).Find(What:=Destination, After:=Cells(65536, DestCol), _
LookIn:=xlValues, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlUp, MatchCase:=False).Select
and it has always worked fine under Excel 2000.
One member of our group just got a new laptop that has Excel 2003... and now that same line of code (which still works fine under 2000) doesn't find the last row of data for that branch, it finds the first! :wot
Can anyone offer any insight to why this may be happening?
Thx
Wizard