ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Replacing certain characters in a cell (https://www.excelbanter.com/excel-worksheet-functions/178912-replacing-certain-characters-cell.html)

Mary Lou[_2_]

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.

Ron Rosenfeld

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

FSt1

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.


PCLIVE

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.





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com