Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting rows based on cell criteria
I would like to write a macro that takes a standard output file into a new file that can be used by a software package that requires a slightly different file. I am a novice VB programmer
The hurdle I would like to solve is removing rows of data that must be removed. I know the rows I want to eliminate since they all have the value "Credit Rating: Foreign Currency" in column B. What is the best way to remove these rows BTW, these are generally small files of less than 500 records Thanks...Joe |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Deleting several rows with given criteria | Excel Discussion (Misc queries) | |||
Deleting rows based on values in a a cell in the row | New Users to Excel | |||
Deleting rows based on a cell value | Excel Worksheet Functions | |||
Deleting Rows based on text in cell & formatting cell based on text in column beside it | Excel Programming | |||
Deleting rows based on criteria | Excel Programming |