Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Delete cell content
Hi,
I need to incorporate some code into my series of macros. I need to be able to check the entire worksheet and if "TRAN" appears anywhere, I need to clear the contents of that cell. Only the word TRAN, if it says TRANSLATE or some other similar word, I need it to stay. Since it would be a part of the macro series, filtering won't work because the data changes daily and I need it fairly automated. Thanks in advance, Chuck |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Delete cell content
Call this:
Sub gsnu() Dim r As Range For Each r In ActiveSheet.UsedRange If r.Value = "TRAN" Then r.Clear Next End Sub -- Gary's Student "Chuck Neal" wrote: Hi, I need to incorporate some code into my series of macros. I need to be able to check the entire worksheet and if "TRAN" appears anywhere, I need to clear the contents of that cell. Only the word TRAN, if it says TRANSLATE or some other similar word, I need it to stay. Since it would be a part of the macro series, filtering won't work because the data changes daily and I need it fairly automated. Thanks in advance, Chuck |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Delete cell content
Sub ClearTran() Cells.Replace What:="TRAN", Replacement:="", LookAt:=xlWhole, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False End Sub -- Bearacade ------------------------------------------------------------------------ Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016 View this thread: http://www.excelforum.com/showthread...hreadid=551901 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Delete cell content
That did it! Thanks so much!
"Gary''s Student" wrote: Call this: Sub gsnu() Dim r As Range For Each r In ActiveSheet.UsedRange If r.Value = "TRAN" Then r.Clear Next End Sub -- Gary's Student "Chuck Neal" wrote: Hi, I need to incorporate some code into my series of macros. I need to be able to check the entire worksheet and if "TRAN" appears anywhere, I need to clear the contents of that cell. Only the word TRAN, if it says TRANSLATE or some other similar word, I need it to stay. Since it would be a part of the macro series, filtering won't work because the data changes daily and I need it fairly automated. Thanks in advance, Chuck |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional Formatting if cell content is a formula | Excel Worksheet Functions | |||
How to click on a cell and have the content of the cell display in a different cell | Excel Worksheet Functions | |||
Help with this conditional IF statement | Excel Discussion (Misc queries) | |||
Custom functions calculating time arguments Help Desperate | Excel Worksheet Functions | |||
can't delete a cell content in excel | New Users to Excel |