Where does it go?

XLerator

New Member
Joined
Apr 10, 2002
Messages
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
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
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
 
Upvote 0

Forum statistics

Threads
1,214,584
Messages
6,120,385
Members
448,956
Latest member
JPav

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top