ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   I need a formula that delete first character and adds another (https://www.excelbanter.com/excel-programming/432281-i-need-formula-delete-first-character-adds-another.html)

Tracey

I need a formula that delete first character and adds another
 
I need a formula that deletes and add:

Example: change

127-0112 to X27-0112

delete first character and replace with "X" or
replace first character with "X"

Tracey Harold

Jacob Skaria

I need a formula that delete first character and adds another
 
A1 =127-0112

Try the formula in B1
="X" & MID(A1,2,LEN(A1))

If this post helps click Yes
---------------
Jacob Skaria


"Tracey" wrote:

I need a formula that deletes and add:

Example: change

127-0112 to X27-0112

delete first character and replace with "X" or
replace first character with "X"

Tracey Harold


Ron Rosenfeld

I need a formula that delete first character and adds another
 
On Tue, 11 Aug 2009 10:34:01 -0700, Tracey
wrote:

I need a formula that deletes and add:

Example: change

127-0112 to X27-0112

delete first character and replace with "X" or
replace first character with "X"

Tracey Harold


=REPLACE(A1,1,1,"X")

--ron

Rick Rothstein

I need a formula that delete first character and adds another
 
You said you "need a formula", so I presume the responses Ron and Jacob gave
you answer you question. However, you did post your question in a
programming newsgroup, so on the off chance you were really looking for a VB
solution...

Range("A1").Value = "X" & Mid(Range("A1").Value, 2)

--
Rick (MVP - Excel)


"Tracey" wrote in message
...
I need a formula that deletes and add:

Example: change

127-0112 to X27-0112

delete first character and replace with "X" or
replace first character with "X"

Tracey Harold




All times are GMT +1. The time now is 11:39 PM.

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