Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Replacing characters with numbers in cells

[[ This message was both posted and mailed: see
the "To," "Cc," and "Newsgroups" headers for details. ]]

I have the following data:
00000000000976042B
00000000000637707{
00000000000016326{
00000000000047546F
00000000001484392E
00000000000687370E
00000000000958500{
00000000000771160{
00000000004424795A

The last character of each row requires translation as follows:
{=0
A=1
B=2
C=3
D=4
E=5
F=6
G=7
H=8
I=9

I'm able to translate the 18th character by using the replace function
but would like a less manual process. I'm a bit outside the box at the
moment and not sure to go from here. Could sure use some help! Thank
you!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Replacing characters with numbers in cells

=LEFT(A2,17)&IF(RIGHT(A2)="{",0,IF(AND(CODE(RIGHT( A2))=65,CODE(RIGHT(A2))<=73),CODE(RIGHT(A2))-64,"Error"))
--
David Biddulph

"Juan Valdez" wrote in message
...
[[ This message was both posted and mailed: see
the "To," "Cc," and "Newsgroups" headers for details. ]]

I have the following data:
00000000000976042B
00000000000637707{
00000000000016326{
00000000000047546F
00000000001484392E
00000000000687370E
00000000000958500{
00000000000771160{
00000000004424795A

The last character of each row requires translation as follows:
{=0
A=1
B=2
C=3
D=4
E=5
F=6
G=7
H=8
I=9

I'm able to translate the 18th character by using the replace function
but would like a less manual process. I'm a bit outside the box at the
moment and not sure to go from here. Could sure use some help! Thank
you!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Replacing characters with numbers in cells

On Tue, 15 Jul 2008 18:55:27 -0400, Juan Valdez wrote:

[[ This message was both posted and mailed: see
the "To," "Cc," and "Newsgroups" headers for details. ]]

I have the following data:
00000000000976042B
00000000000637707{
00000000000016326{
00000000000047546F
00000000001484392E
00000000000687370E
00000000000958500{
00000000000771160{
00000000004424795A

The last character of each row requires translation as follows:
{=0
A=1
B=2
C=3
D=4
E=5
F=6
G=7
H=8
I=9

I'm able to translate the 18th character by using the replace function
but would like a less manual process. I'm a bit outside the box at the
moment and not sure to go from here. Could sure use some help! Thank
you!



=LEFT(A1,LEN(A1)-1) & VLOOKUP(RIGHT(A1,1),
{"{",0;"A",1;"B",2;"C",3;"D",4;"E",5;"F",6;"G",7;" H",8;"I",9},2,FALSE)
--ron
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Replacing characters with numbers in cells

Juan Valdez wrote...
I have the following data:
00000000000976042B
00000000000637707{
00000000000016326{
00000000000047546F
00000000001484392E
00000000000687370E
00000000000958500{
00000000000771160{
00000000004424795A

The last character of each row requires translation as follows:
{=0
A=1
B=2
C=3
D=4
E=5
F=6
G=7
H=8
I=9

....

Another option,

=SUBSTITUTE(A1,RIGHT(A1,1),FIND(RIGHT(A1,1),"{ABCD EFGHI")-1)

or, with error reporting,

=SUBSTITUTE(A1,RIGHT(A1,1),IF(COUNT(FIND(RIGHT(A1, 1),"{ABCDEFGHI")),
FIND(RIGHT(A1,1),"{ABCDEFGHI")-1," -error: "&RIGHT(A1,1)))
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Replacing characters with numbers in cells

On Tue, 15 Jul 2008 18:30:13 -0700 (PDT), Harlan Grove
wrote:

=SUBSTITUTE(A1,RIGHT(A1,1),FIND(RIGHT(A1,1),"{ABC DEFGHI")-1)


Nice.
--ron


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Replacing characters with numbers in cells

=SUBSTITUTE(A1,RIGHT(A1,1),FIND(RIGHT(A1,1),"{ABCD EFGHI")-1)

This is, of course, a general solution (and a nice one at that); however, if
the OP's data items are always 18 characters long (as his posted example
seems to suggest), you can save a function call by modifying your formula
like this...

=LEFT(A1,17)&(FIND(RIGHT(A1),"{ABCDEFGHI")-1)

Rick

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 947
Default Replacing characters with numbers in cells

Just another variation:

=LEFT(A1,17)&MOD(1302838,CODE(RIGHT(A1))-62)

--
Dana DeLouis


"Juan Valdez" wrote in message ...

[[ This message was both posted and mailed: see
the "To," "Cc," and "Newsgroups" headers for details. ]]

I have the following data:
00000000000976042B
00000000000637707{
00000000000016326{
00000000000047546F
00000000001484392E
00000000000687370E
00000000000958500{
00000000000771160{
00000000004424795A

The last character of each row requires translation as follows:
{=0
A=1
B=2
C=3
D=4
E=5
F=6
G=7
H=8
I=9

I'm able to translate the 18th character by using the replace function
but would like a less manual process. I'm a bit outside the box at the
moment and not sure to go from here. Could sure use some help! Thank
you!
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 certain characters in a cell Mary Lou[_2_] Excel Worksheet Functions 3 March 5th 08 09:40 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:29 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"