Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default replace part text in a cell

How can I replace the 7th item in each cell of the examples below to say 5?

30-02220.900.LAU should be changed to say 30-02250.900.LAU
40-02430.000.FIN should be changed to say 40-02450.000.FIN
10-02210.520.005 should be changed to say 10-02240.510.004

Many thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 703
Default replace part text in a cell

On 8 Dec., 03:47, Indra wrote:
How can I replace the 7th item in each cell of the examples below to say 5?

30-02220.900.LAU should be changed to say 30-02250.900.LAU
40-02430.000.FIN should be changed to say 40-02450.000.FIN
10-02210.520.005 should be changed to say 10-02240.510.004

Many thanks!


Try this:

=LEFT(A1,6) & 5 & MID(A1,8,LEN(A1)-7)

Regards,
Per
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default replace part text in a cell

On Sun, 7 Dec 2008 18:47:01 -0800, Indra
wrote:

How can I replace the 7th item in each cell of the examples below to say 5?

30-02220.900.LAU should be changed to say 30-02250.900.LAU
40-02430.000.FIN should be changed to say 40-02450.000.FIN
10-02210.520.005 should be changed to say 10-02240.510.004

Many thanks!



=REPLACE(A1,7,1,5)

will do it but your third example appears to be incorrect -- you have replaced
the 7th character "1" with a "4"
--ron
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,934
Default replace part text in a cell

Or more directly...

=REPLACE(A1,7,1,5)

--
Rick (MVP - Excel)


"Per Jessen" wrote in message
...
On 8 Dec., 03:47, Indra wrote:
How can I replace the 7th item in each cell of the examples below to say
5?

30-02220.900.LAU should be changed to say 30-02250.900.LAU
40-02430.000.FIN should be changed to say 40-02450.000.FIN
10-02210.520.005 should be changed to say 10-02240.510.004

Many thanks!


Try this:

=LEFT(A1,6) & 5 & MID(A1,8,LEN(A1)-7)

Regards,
Per


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find & Replace: find part cell, replace whole cell katy Excel Worksheet Functions 3 April 3rd 23 01:20 PM
find text in cell and replace it with part of the text in that ce. jules Excel Discussion (Misc queries) 3 May 3rd 07 10:18 AM
REPLACE PART OF CELL WITH FORMATTED TEXT Manju Excel Worksheet Functions 8 December 27th 06 11:42 PM
Find and replace part of a text string [email protected] Excel Discussion (Misc queries) 2 July 10th 06 10:34 PM
Replace part of link address in a cell with a value(date) from ano Hakan Excel Discussion (Misc queries) 0 July 20th 05 12:39 PM


All times are GMT +1. The time now is 04:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"