Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Delete Rows Based On Content


Hi folks:

I'm tryint to build a code that would select a cell, check if th
content matches one of two options and if so, move down to the nex
cell, else delete the row. this is what I have:

Do
If ActiveCell = "OPERATOR ID" Or ActiveCell = "JC" Then
ActiveCell.Offset(1, 0).Select
Else: Selection.EntireRow.Delete
End If
Loop Until ActiveCell = "*"

It's working but only for the "JC" not the Op ID. All cells ar
formatted as text.

Any thoughts??? :eek

--
halem
-----------------------------------------------------------------------
halem2's Profile: http://www.excelforum.com/member.php...nfo&userid=993
View this thread: http://www.excelforum.com/showthread.php?threadid=26848

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default Delete Rows Based On Content

It's looking for the literal text OPERATOR ID. Is that what you want?

On Tue, 12 Oct 2004 09:02:12 -0500, halem2
wrote:


Hi folks:

I'm tryint to build a code that would select a cell, check if the
content matches one of two options and if so, move down to the next
cell, else delete the row. this is what I have:

Do
If ActiveCell = "OPERATOR ID" Or ActiveCell = "JC" Then
ActiveCell.Offset(1, 0).Select
Else: Selection.EntireRow.Delete
End If
Loop Until ActiveCell = "*"

It's working but only for the "JC" not the Op ID. All cells are
formatted as text.

Any thoughts???


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
Highting rows based on content of cells Sarah Excel Worksheet Functions 1 January 24th 07 09:44 PM
Delete Row based off cell content Chuck Neal Excel Discussion (Misc queries) 3 March 29th 06 08:52 PM
Delete rows by content Raza Excel Worksheet Functions 3 November 19th 05 09:20 PM
Hide/Delete entire rows based in the content of one cell Clueless Excel Discussion (Misc queries) 2 October 3rd 05 02:40 PM
Delete entire row based on cell content PHIL Excel Programming 2 December 3rd 03 01:39 AM


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