Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Try this
Sub Example2() Dim Firstrow As Long Dim Lastrow As Long Dim Lrow As Long Dim CalcMode As Long Dim ViewMode As Long With Application CalcMode = .Calculation .Calculation = xlCalculationManual .ScreenUpdating = False End With ViewMode = ActiveWindow.View ActiveWindow.View = xlNormalView Firstrow = ActiveSheet.UsedRange.Cells(1).Row Lastrow = ActiveSheet.UsedRange.Rows.Count + Firstrow - 1 With ActiveSheet .DisplayPageBreaks = False For Lrow = Lastrow To Firstrow Step -1 If .Cells(Lrow, "B").Value = Date And _ .Cells(Lrow, "D").Value = "F800" Then ' do nothing Else .Rows(Lrow).Delete End If Next End With ActiveWindow.View = ViewMode With Application .ScreenUpdating = True .Calculation = CalcMode End With End Sub -- Regards Ron De Bruin http://www.rondebruin.nl "Ron de Bruin" wrote in message ... Oops do not read it good Send you a new macro soon -- Regards Ron De Bruin http://www.rondebruin.nl "SITCFanTN" wrote in message ... I have a huge report that lists information for many days. I want to delete all rows that don't meet the criteria of todays date in column B. I also want to only keep rows that have todays date with F800 in column D. I plan on putting this code in a macro. Thanks so much....happy summer!!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code to delete rows and column cells that have formulas in. | Excel Worksheet Functions | |||
Want to delete rows | Excel Discussion (Misc queries) | |||
How do I find duplicate rows in a list in Excel, and not delete it | Excel Discussion (Misc queries) | |||
Protect Worksheet but allow to insert or delete rows | Excel Discussion (Misc queries) | |||
delete extra columns and rows | Excel Discussion (Misc queries) |