ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   replace formula (https://www.excelbanter.com/excel-worksheet-functions/61260-replace-formula.html)

Andy the yeti

replace formula
 
Hi, thanks in advance for any help...

I have a series of 8 number codes (eg 12771497) that starts with one of the
numbers from 1 to 26, I would lile to replace for example 1 with A, 2 with B,
3 with C, 26 with Z etc

so it would change from 12771497 L771497

I tried writting a if =, but after 10 statements it failed to work, any
idea's ??

Thanks again



Niek Otten

replace formula
 
Hi Andy,

If it's always 8 digits, how do we now whether to take 1 or 2 start digits?

iow, why is your example not A2771497?

For your example:

=CHAR(LEFT(A1,2)+64)&RIGHT(A1,6)

--
Kind regards,

Niek Otten

"Andy the yeti" <Andy the wrote in message
...
Hi, thanks in advance for any help...

I have a series of 8 number codes (eg 12771497) that starts with one of
the
numbers from 1 to 26, I would lile to replace for example 1 with A, 2 with
B,
3 with C, 26 with Z etc

so it would change from 12771497 L771497

I tried writting a if =, but after 10 statements it failed to work, any
idea's ??

Thanks again





Jay

replace formula
 
I have a series of 8 number codes (eg 12771497) that starts with one
of the numbers from 1 to 26, I would lile to replace for example 1
with A, 2 with B, 3 with C, 26 with Z etc

so it would change from 12771497 L771497


One way:
=CHAR(CODE("A")+INT(A1/1000000)-1)&MOD(A1,1000000)


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

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