Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that finds and replaces "-" with text ("REP") in a particular
column (in this example, C). My worksheet looks like this: A B C abc 123 abc - 321 - abc 456 - a-c 654 - The macro works fine except for rows that happen to also have a dash in column A. Maybe my macro isn't specifying column C exactly? I used the Record Macro option... Sub ReplaceDash() Columns("I:I").Select Range("I7").Activate Selection.Replace What:="-", Replacement:="REP", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False End Sub Could someone please shed some light? Thanks in advance! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Replace Comma's with Dash | Excel Worksheet Functions | |||
Find And Replace a Dash | Excel Discussion (Misc queries) | |||
Replace Comma with Dash | Excel Worksheet Functions | |||
replace dash in a number sequence | Excel Worksheet Functions | |||
Replace Error with a Dash | Excel Worksheet Functions |