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: 1
Default Help, there must be a better way!

I've been trying all day to crack this without success. Any help would
be very much appreciated!

Here is my code. There must be a better way, using either a look-up
table or Select Case statement to do this but I'm not yet experienced
enough to work it out.
The below works, to a point, until it starts deleting the rows! Then,
because it shifts the row up it jumps a row so I need a way to address
this using some kind of statement?


lLastRow = .Cells.SpecialCells(xlCellTypeLastCell).Row
Set myRange = WorCtrlsheet.Range("b2", Cells(lLastRow, "b"))
With myRange

For Each Cell In myRange

If Cell.Value < "Criteria 1" And _
Cell.Value < "Criteria 2" And _
Cell.Value < "Criteria 3" And _
Cell.Value < "Criteria 4" And _
Cell.Value < "Criteria 5" And _
Cell.Value < "Criteria 6" And _
Cell.Value < "Criteria 7" And _
Cell.Value < "Criteria 8" And _
Cell.Value < "Criteria 9" And _
Cell.Value < "Criteria 10" And _
Cell.Value < "Criteria 11" And _
Cell.Value < "Criteria 12" And _
Cell.Value < "Criteria 13" And _
Cell.Value < "Criteria 14" Then

Cell.EntireRow.Delete

End If
Next i



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

 
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



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