Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Speed of Replace Range | Excel Discussion (Misc queries) | |||
replace null cells within a range to 0 | Excel Discussion (Misc queries) | |||
Find within range & Replace with Blank Value | Excel Discussion (Misc queries) | |||
Find/replace range | Excel Programming | |||
Replace() Range Function | Excel Programming |