Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
replacing a range of numbers sg Excel Worksheet Functions 3 August 14th 08 01:45 PM
Replacing a Range of Numbers Peter Herman Excel Worksheet Functions 1 July 10th 08 10:30 PM
Replacing Range Names Jim May Excel Discussion (Misc queries) 2 October 25th 06 12:54 PM
Replacing Linked Cell Values w/ Current Values TomCat Excel Worksheet Functions 6 April 10th 06 12:20 PM
deleting values in a worksheet without deleting the formulas patti Excel Worksheet Functions 1 October 28th 05 09:49 PM


All times are GMT +1. The time now is 03:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"