Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting/Replacing Values in a Range
Hello.
I am trying to delete (or replace with nothing) values in a range. For example, the word "Blank" in the following range I am using: sInput.Range("Y22:Y200").Replace What:="Blank", Replacement:="", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False This works, but is there a better way of writing this... or perhaps something more efficient? I don't have to necessarily use replace, as deleting these values would suffice. Any help would be appreciated. Thanks. Dan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting/Replacing Values in a Range
oops, clear method may be a tad too efficient, everything will be clear in
the range. So, Replace method is a better deal. "kiat" wrote in message ... How about Range("Y22:Y200").clearcontents You may check out Object Browser and find out more on the various Clear methods for object Range. Another way is press the key F1 in the code and see what you'll find. "Dan Gesshel" wrote in message ... Hello. I am trying to delete (or replace with nothing) values in a range. For example, the word "Blank" in the following range I am using: sInput.Range("Y22:Y200").Replace What:="Blank", Replacement:="", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False This works, but is there a better way of writing this... or perhaps something more efficient? I don't have to necessarily use replace, as deleting these values would suffice. Any help would be appreciated. Thanks. Dan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting/Replacing Values in a Range
..clearcontents and .clear wipe out the whole range.
I can't imagine anything more efficient than what you first came up with, for the selective processing you indicate. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
replacing a range of numbers | Excel Worksheet Functions | |||
Replacing a Range of Numbers | Excel Worksheet Functions | |||
Replacing Range Names | Excel Discussion (Misc queries) | |||
Replacing Linked Cell Values w/ Current Values | Excel Worksheet Functions | |||
deleting values in a worksheet without deleting the formulas | Excel Worksheet Functions |