Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Evaluating Empty Cells


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   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Evaluating Empty Cells

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   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Evaluating Empty Cells

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Evaluating Empty Cells

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
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Evaluating a group of cells John Excel Discussion (Misc queries) 3 July 10th 08 02:53 PM
evaluating text of cells [email protected] Excel Discussion (Misc queries) 1 January 22nd 08 07:03 PM
If formula evaluating 2 cells contents N E Body Excel Worksheet Functions 3 August 17th 05 06:54 PM
Evaluating cells for items in list Mike[_58_] Excel Programming 1 November 21st 03 09:22 AM
Can blank cells created using empty Double-Quotes not be empty?? JohnI in Brisbane Excel Programming 6 September 7th 03 11:22 PM


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