Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I need to find a column and make a copy of it somewhere (for backup
reference). Then, for the first column (the one I copied) I need to replace a number by a city name. The problem is that ALL of the said number in the sheet ias replace by the city name. I thought by selecting and activate the column it would prevent to do this, but it's not working properly. Below is the code I use. Thank you! Range("A1").Select Cells.Find(What:="Plnt", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _ , SearchFormat:=False).Activate Selection.Resize(numRows + 30000, numColumns + 1).Select Selection.Copy Range("A1").End(xlToRight).Select ActiveCell.Offset(0, 1).Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Cells.Find(What:="Plnt", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _ , SearchFormat:=False).Activate Selection.Resize(numRows + 30000, numColumns + 1).Select Cells.Replace What:="2110", Replacement:="Joliette", LookAt:=xlPart, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False -- Mathieu |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I find/replace data in selected cells only | Excel Worksheet Functions | |||
Copy and replace xlsm files, but retain the values in selected cells... | Excel Discussion (Misc queries) | |||
Can I replace a ' at the beginning of a text cell using Replace | Excel Discussion (Misc queries) | |||
Replace fuction replacing all instead of selected cells | Excel Programming | |||
find and replace - replace data in rows to separated by commas | Excel Worksheet Functions |