S
Sue
I'm a novice VBA user - any assistance is appreciated.
I am using Excel 2003 and have a worksheet with about 15K rows of data. I
need VBA code that will help to delete duplicate data and extraneous data
based on specific dates or blank cells.
My worksheet looks like this:
HRID UID LName FName MI Region StartDate AdjStartDate CurrentDate TermDate
0001 lj1 Jones Lily USA 5/19/1999 5/19/1999
0002 js2 Smith Jon E Can 5/19/1999 5/19/1999
7/1/2000
0002 js2 Smith Jon E Can 5/19/1999 5/19/1999
0004 bh3 Ham Bill G USA 6/1/2000 6/1/2000 9/1/2003
9/1/2003
0005 vv5 Vish V V Ind 7/1/2003 7/1/2003 8/31/2007
8/31/2007
I am looking for VBA code that will detect the duplicates and do the
following base on dates:
If the CurrentDate and TermDate are blank ignore
If the CurrentDate is blank and the TermDate is populated delete only if
there is another row for the user where the current and term dates are blank,
else delete
If both current and termdates are populated and the dates are prior to
1/1/2007 then delete the row.
Keep all rows with delete dates after 1/1/2007
Once I have this down to only 2007 data and open dates I can begin to
calculate duration time in years and quarters.
Thank you in advance for any assistance.
I am using Excel 2003 and have a worksheet with about 15K rows of data. I
need VBA code that will help to delete duplicate data and extraneous data
based on specific dates or blank cells.
My worksheet looks like this:
HRID UID LName FName MI Region StartDate AdjStartDate CurrentDate TermDate
0001 lj1 Jones Lily USA 5/19/1999 5/19/1999
0002 js2 Smith Jon E Can 5/19/1999 5/19/1999
7/1/2000
0002 js2 Smith Jon E Can 5/19/1999 5/19/1999
0004 bh3 Ham Bill G USA 6/1/2000 6/1/2000 9/1/2003
9/1/2003
0005 vv5 Vish V V Ind 7/1/2003 7/1/2003 8/31/2007
8/31/2007
I am looking for VBA code that will detect the duplicates and do the
following base on dates:
If the CurrentDate and TermDate are blank ignore
If the CurrentDate is blank and the TermDate is populated delete only if
there is another row for the user where the current and term dates are blank,
else delete
If both current and termdates are populated and the dates are prior to
1/1/2007 then delete the row.
Keep all rows with delete dates after 1/1/2007
Once I have this down to only 2007 data and open dates I can begin to
calculate duration time in years and quarters.
Thank you in advance for any assistance.