Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi all, Please can anyone help me with this? 1) I am looking put additional functionality in my current code (below) to delete rows if value in column A (which is a date in this format 12/31/2005) is the current month. i.e. if this month is November 2005, delete every row for november 2005-the current month. How do i add to this code to do that? 2) Also, how do i add to this code to delete duplicate rows in my sheet? Like if i have two exact dates in column A, delete one and keep one! Thanks in advance :) Code: -------------------- Worksheets("DataTable").Select With ActiveSheet If .AutoFilterMode = False Then .Cells(1, 1).AutoFilter .Range("A1").AutoFilter Field:=1, Criteria1:=#3/25/2005#, _ Operator:=xlOr, Criteria2:=#12/31/2004# .Range("A1").CurrentRegion.Offset(1, 0).SpecialCells _ (xlCellTypeVisible).EntireRow.Delete .AutoFilterMode = False End With -------------------- -- Mslady ------------------------------------------------------------------------ Mslady's Profile: http://www.excelforum.com/member.php...o&userid=27776 View this thread: http://www.excelforum.com/showthread...hreadid=481904 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Current Month | Excel Discussion (Misc queries) | |||
Subtract a future month from the current month to get remaining m. | Excel Worksheet Functions | |||
Retrieve data for previous 3, 6, 12 month given current month | Excel Worksheet Functions | |||
Calculate the first day of the month for the current month? | Excel Discussion (Misc queries) | |||
Current Month | Excel Programming |