Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Option Explicit
Sub testme() Dim lCtr As Long With ActiveSheet For lCtr = Asc("A") To Asc("Z") .Cells.Replace What:=Chr(lCtr) & "3", _ Replacement:=Chr(lCtr) & "4", _ LookAt:=xlPart, _ SearchOrder:=xlByRows, _ MatchCase:=False, _ SearchFormat:=False, _ ReplaceFormat:=False Next lCtr End With End Sub Scooter wrote: If I wanted to replace text "A3" with "A4" I would do this Cells.Replace What:="A3", _ Replacement:="A4", _ LookAt:=xlPart, _ SearchOrder:=xlByRows, _ MatchCase:=False, _ SearchFormat:=False, _ ReplaceFormat:=False How could I put this in a loop to also replace also "B3" with "B4", "C3" with "C4", all the way to "Z3" with "Z4"? -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
loop and fine & replace | Excel Programming | |||
any function to replace loop | Excel Programming | |||
Msg Box on each Loop to Replace text | Excel Programming | |||
Replace using Do loop | Excel Programming | |||
Replace Loop | Excel Programming |