Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have a short sub evaluating cell contents. If it is diffrent fro "OT" then delete entire row. It works fine but I need to make it sto if cell is empty ![]() Sub Julie() Cells(6, 6).Select Do If ActiveCell < "OT" Then Selection.EntireRow.Delete Else: ActiveCell.Offset(1, 0).Select End If Loop Until ActiveCell = "" End Sub thank -- halem ----------------------------------------------------------------------- halem2's Profile: http://www.excelforum.com/member.php...nfo&userid=993 View this thread: http://www.excelforum.com/showthread.php?threadid=26697 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
try this do while not isempty(activecell) or -----Original Message----- I have a short sub evaluating cell contents. If it is diffrent from "OT" then delete entire row. It works fine but I need to make it stop if cell is empty ![]() Sub Julie() Cells(6, 6).Select Do If ActiveCell < "OT" Then Selection.EntireRow.Delete Else: ActiveCell.Offset(1, 0).Select End If Loop Until ActiveCell = "" End Sub thanks -- halem2 ---------------------------------------------------------- -------------- halem2's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=9930 View this thread: http://www.excelforum.com/showthread...hreadid=266973 . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi again
excuse me that should be LOOP while not isempty(activecell) I put my criteria after the do and was running on habit. -----Original Message----- I have a short sub evaluating cell contents. If it is diffrent from "OT" then delete entire row. It works fine but I need to make it stop if cell is empty ![]() Sub Julie() Cells(6, 6).Select Do If ActiveCell < "OT" Then Selection.EntireRow.Delete Else: ActiveCell.Offset(1, 0).Select End If Loop Until ActiveCell = "" End Sub thanks -- halem2 ---------------------------------------------------------- -------------- halem2's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=9930 View this thread: http://www.excelforum.com/showthread...hreadid=266973 . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Julie()
Dim cRows As Long Dim i As Long cRows = Cells(Rows.Count, 6).End(xlUp).Row For i = cRows To 6 Step -1 If Cells(i, 6).Value < "OT" Then Cells(i, 1).EntireRow.Delete End If Next i End Sub -- HTH RP "halem2" wrote in message ... I have a short sub evaluating cell contents. If it is diffrent from "OT" then delete entire row. It works fine but I need to make it stop if cell is empty ![]() Sub Julie() Cells(6, 6).Select Do If ActiveCell < "OT" Then Selection.EntireRow.Delete Else: ActiveCell.Offset(1, 0).Select End If Loop Until ActiveCell = "" End Sub thanks -- halem2 ------------------------------------------------------------------------ halem2's Profile: http://www.excelforum.com/member.php...fo&userid=9930 View this thread: http://www.excelforum.com/showthread...hreadid=266973 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Evaluating a group of cells | Excel Discussion (Misc queries) | |||
evaluating text of cells | Excel Discussion (Misc queries) | |||
If formula evaluating 2 cells contents | Excel Worksheet Functions | |||
Evaluating cells for items in list | Excel Programming | |||
Can blank cells created using empty Double-Quotes not be empty?? | Excel Programming |