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: 5
Default Select & deleting all rows based on the contents of a cell in the

I need to create what I thought would be a very simple macro; select some
rows, delete them, and then do a File - Save As, and save the file out as a
tab delimited ascii text file. Simple, right? That's what I thought.

Except that I need to select those rows based on certain criteria. The
spreadsheet in question has seven columns it is using. The first row in the
spreadsheet contains the column names. The fifth column is called Server
Tested (it is column E). The cells in this column can have only one of four
possible values; www1 or www2 or www3 or www5. What I need to do is to select
all the rows that have a cell, in the 5th column of the row, that has a value
of www2 or www3 or www5 (all rows where that cell has a value of www1 I want
to be left alone), and then delete those rows.

Now, if this were a database and I was using SQL, I might use something
similar to this:

Delete * from tablename (where ([dbname.tablename.fieldname] = "www2") or
([dbname.tablename.fieldname] = "www3" or ([dbname.tablename.fieldname] =
"www5")) That might not be exactly correct syntax, but you get the idea.

But I can't find anything anwhere in the Excel menu structure that will even
let me select rows based specific criteria. I was able to get Excel to select
specific cells based on specific criteria, but it only selected the cell, not
the entire row that the cell was in. And then it did offer me any way to do a
delete after selecting the cells (even if it had, it wouldn't have done me
any good because I needed to delete the whole row, not just that specific
cell).

Can you tell me how to do what I need to do?
 
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
Deleting rows based on a cell value [email protected] Excel Programming 1 November 6th 06 08:22 PM
Macro Help for Deleting Blank Rows & Clearing Cell Contents ksp Excel Programming 2 January 13th 06 05:25 AM
how to select a Row based on contents of a Cell swintronix Excel Programming 8 January 5th 06 11:52 PM
Deleting rows dependent upon cell contents daedalus1 Excel Programming 4 October 25th 05 02:05 PM
select a cell based on A1 contents Bill Kuunders Excel Programming 2 August 24th 05 11:23 PM


All times are GMT +1. The time now is 11:58 PM.

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"