Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 21
Default Replacing certain characters in a cell

I have the a cell which contains various numbers (example 9123***********9)
I need to replace whatever the 2nd, 3rd, and 4th number is with a * leaving
everything else the same. Can someone tell me how I can do this.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Replacing certain characters in a cell

On Wed, 5 Mar 2008 13:19:01 -0800, Mary Lou
wrote:

I have the a cell which contains various numbers (example 9123***********9)
I need to replace whatever the 2nd, 3rd, and 4th number is with a * leaving
everything else the same. Can someone tell me how I can do this.


Will the 2nd, 3rd and 4th numbers also always be the 2nd, 3rd, and 4th
characters? If so, then:

=REPLACE(A1,2,3,"*")

should do it.

If not, post back with more information as to the variability in your data.
--ron
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
Default Replacing certain characters in a cell

hi
try this i a cell on the side....
=SUBSTITUTE(A1,123,321)
A1 = cell containing the data
123 = data to replace
321 = replacement data

Regards
FSt1

"Mary Lou" wrote:

I have the a cell which contains various numbers (example 9123***********9)
I need to replace whatever the 2nd, 3rd, and 4th number is with a * leaving
everything else the same. Can someone tell me how I can do this.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default Replacing certain characters in a cell

One possible way:

=LEFT(A1,1) & "***"& RIGHT(A1,LEN(A1)-4)

HTH,
Paul

--

"Mary Lou" wrote in message
...
I have the a cell which contains various numbers (example 9123***********9)
I need to replace whatever the 2nd, 3rd, and 4th number is with a *
leaving
everything else the same. Can someone tell me how I can do this.



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
Replacing last 3 characters and adding them to front [email protected] Excel Discussion (Misc queries) 4 December 18th 06 08:29 PM
Replacing ascii characters HappyCamper Excel Worksheet Functions 2 February 8th 06 07:10 PM
Replacing specific characters Trey Excel Discussion (Misc queries) 3 January 20th 06 11:57 PM
Replacing specific characters with spaces Night Owl Excel Worksheet Functions 3 May 13th 05 05:52 PM
Replacing characters OhhAhh Excel Worksheet Functions 10 March 4th 05 12:28 AM


All times are GMT +1. The time now is 04:56 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"