Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Range Replace

The following macro works well as two seperate halves but fails when joined
together
Range(ActiveCell, ActiveCell.Offset(2, 0)).Select
Selection.EntireRow.Select.Replace What:=Range("AB28"), _
Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False

The first half works, but the second half (from "Replace...") comes back
with the comment "Run Time Error 424" & " Object required", can anyone please
help?

Rewop Eilsel
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Range Replace

Try something more like this...

Range(ActiveCell, ActiveCell.Offset(2, 0)).EntireRow.Replace _
What:=Range("AB28"), _
Replacement:="", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False
--
HTH...

Jim Thomlinson


"Rewop Eilsel" wrote:

The following macro works well as two seperate halves but fails when joined
together
Range(ActiveCell, ActiveCell.Offset(2, 0)).Select
Selection.EntireRow.Select.Replace What:=Range("AB28"), _
Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False

The first half works, but the second half (from "Replace...") comes back
with the comment "Run Time Error 424" & " Object required", can anyone please
help?

Rewop Eilsel

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Range Replace

Thanks Jim, your suggestion works beautifully
Regards
Rewop Eilsel

"Rewop Eilsel" wrote:

The following macro works well as two seperate halves but fails when joined
together
Range(ActiveCell, ActiveCell.Offset(2, 0)).Select
Selection.EntireRow.Select.Replace What:=Range("AB28"), _
Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False

The first half works, but the second half (from "Replace...") comes back
with the comment "Run Time Error 424" & " Object required", can anyone please
help?

Rewop Eilsel

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
Speed of Replace Range Monk[_2_] Excel Discussion (Misc queries) 6 May 24th 08 04:57 AM
replace null cells within a range to 0 Abbey Normal Excel Discussion (Misc queries) 5 August 29th 07 01:54 AM
Find within range & Replace with Blank Value JG14 Excel Discussion (Misc queries) 4 July 13th 07 05:06 PM
Find/replace range Corrine Excel Programming 3 April 26th 06 02:38 PM
Replace() Range Function Bernie Deitrick Excel Programming 1 July 22nd 04 06:06 PM


All times are GMT +1. The time now is 07:20 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"