![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 21
|
I've got this formula, but I don't know how to apply it to the data? Ie where do I type it in?
Range("C1").Select For i = 1 To 2048 If ActiveCell.Value Like "TEXT" Then ActiveCell.EntireRow.Select Selection.Delete Shift:=xlUp ActiveCell.Offset(0, 2).Select Else ActiveCell.Offset(RowOffset:=1).Select End If Next i |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Central Florida, USA
Posts: 7,541
|
Right click the sheet tab of the sheet that you want the code to work on. Select "view Code." Type:
Sub myTextDelete() and hit enter. Then copy the code you posted between the Sub and End statements. Your code will search column C starting with "C1" and ending with "C2048" for any cell with the word "TEXT" as case sensitive. If found on your sheet it will delete the entire row that contained "TEXT" in column "C." Hope this helps. JSW [ This Message was edited by: Joe Was on 2002-04-11 19:52 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|