Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Deleting rows based on cell criteria

If everyline has something in it on the column B cell use this otherwise you a terminating value to no when this would terminate

Worksheet("worksheet name").Activat
If moCurrCell.Value = "Credit Rating: Foreign Currency" The
Selection.EntireRow.Delet
Set CurrLine = Range("B1"
Set NextLine = CurrLine.Offset(0, 1
CurrLine.Selec
D
If CurrLine.Value = "Credit Rating: Foreign Currency" The
Selection.EntireRow.Delet
End I
Set CurrLine = NextLin
Set NextLine = CurrLine.Offset(0, 1
CurrLine.Selec
Loop Until CurrLine.Value = "

Change "Loop Until CurrLine. Value = " comparison of "" to "xx" if you know that the last line has an "xx" in it.

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
Deleting several rows with given criteria Rechie Excel Discussion (Misc queries) 7 October 20th 09 01:38 PM
Deleting rows based on values in a a cell in the row Martin New Users to Excel 1 January 25th 09 11:46 AM
Deleting rows based on a cell value JPriest Excel Worksheet Functions 3 August 12th 05 05:44 PM
Deleting Rows based on text in cell & formatting cell based on text in column beside it Steve Excel Programming 4 February 26th 04 03:31 PM
Deleting rows based on criteria John Walker[_2_] Excel Programming 2 December 12th 03 08:37 PM


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