Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Find and replace specific characters within a cell based on positi
I am attempting to replace specific characters within a cell based on their
position, but have not come up with a workable solution. I need to always replace only the last two characters to the right side of the cell with a 10 character entry containing two letters and 8 digits. The search is limited to one column. As long as there is only one instance of the two digits being replaced within a cell, all is fine, but if the cell contains more than 1 instance of the two digits, both instances are replaced. Example, assuming I use the replace command specifying I find "53" and replace with "31" (assuming there is only one instance of 53 in a cell): --Before-- AZ01003053 AZ01003153 AZ06100953 AZ01003253 AZ01006053 --After-- AZ01003031 (Correct) AZ01003131 (Correct) AZ06100931 (Correct) AZ01003231 (Correct) AZ01006031 (Correct) Example, assuming I use the replace command specifying I find "53" and replace with "31" (assuming there is more than one instance of 53 in a cell): --Before-- AZ01003053 AZ01003153 AZ06100953 AZ01003253 AZ01006053 AZ19995353 --After-- AZ01003031 (Correct) AZ01003131 (Correct) AZ06100931 (Correct) AZ01003231 (Correct) AZ01006031 (Correct) AZ19993131 (Incorrect) Any help would be greatly appreciated. ccgsuper |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to find and replace content of a specific cell based on its ad | Excel Discussion (Misc queries) | |||
How do you find and replace tab characters in a cell in Excel? | Excel Discussion (Misc queries) | |||
FIND and REPLACE characters needed | Excel Worksheet Functions | |||
How do I find replace special characters? | Excel Discussion (Misc queries) | |||
Find and replace unusual characters ... | Excel Discussion (Misc queries) |