changing numbers to letters

dftf

New Member
Joined
Apr 28, 2006
Messages
37
Is there any easy way to do this?

I have 200+ spreadsheets, each with 1000's of lines, that I need to modify. This is an example of the numbers in a column.
2
2
6
6
10
10
15
15
15
15
15
24
27
31
35
35
39
39
44

I need to change them to the sequential letter. The twos, since they are first, would change to As, the sixes, since they are second, would change to Bs, etc.

The catch is that the numbers wouldn't always correspond to the same letter. The sixes might come fourth in the next list and would need to change to Ds, the fourth letter.

Thanks for any help.

David
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Let's say that your data begins in Cell A1. If you want to put your letter codes in column B, then enter these values/formulas:

In Cell B1: A
In Cell B2: =IF(A2=A1,B1,CHAR(CODE(B1)+1))
copy down for all rows

This will work, at least for the first 26 changes.
 
Upvote 0
I see that an answer was forthcoming before I got a chance. but I'll share anyway, since I went a little bit more generic. I assumed that your list might not be sorted, which Jm14's solution depends upon... so here is an alternative (less compact) if the numbers may appear in random order:
Book1
IJKLM
1755B
1844A
1999F
204 A
2188E
2266C
236 C
2477D
257 D
261515H
271212G
2812 G
2912 G
3012 G
Sheet1
 
Upvote 0
Yes, my solution does depend on the list being sorted. I was going off of the example they posted. I probably should have said that in my reply...
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,255
Members
448,556
Latest member
peterhess2002

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top