Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default delete row if text in cell

Add another "Or" and add "Not IsNumeric(.Cells(Lrow, "H"))
HTH Otto
"KelliInCali" wrote in message
...
I need to identify a row in which column D contains text in order to delete
the row.

Basically, I want to delete any rows for which D does not have a whole
number greater than zero.

Here is what I'm already working with, which identifies blanks and numbers
less than zero, but it does not remove rows that remain containing text.

With ActiveSheet
.DisplayPageBreaks = False
StartRow = 1
EndRow = .Cells(.Rows.Count, "D").End(xlUp).Row

For Lrow = EndRow To StartRow Step -1
If .Cells(Lrow, "H").Value < 0.01 Or _
.Cells(Lrow, "H").Value = "" Then
.Rows(Lrow).Delete
End If

Next
End With

tia,
kelli



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
how to delete a row with a cell containing certain number or text ann Excel Discussion (Misc queries) 2 June 16th 08 03:08 PM
delete text in a cell using certian criteria Ken Excel Discussion (Misc queries) 4 April 12th 08 06:19 AM
delete part of text from a cell andresg1975 Excel Worksheet Functions 4 October 20th 06 05:04 PM
Delete cell with red text Kara Excel Programming 2 July 26th 05 06:40 PM
Delete text from cell containing text and numbers? index[_4_] Excel Programming 9 November 30th 03 09:48 PM


All times are GMT +1. The time now is 06:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"