Change two letter code to full word

J

Juan Sanchez

If you want the actual cell where the 2 digit code is
entered to be replaced with the full word description you
will need code for that. I saw an example of how to do it
with the autocorrect built in tool, the same one that
changes adn to and when you misstype, but then anywere you
type the code it will be changed (not a good solution, at
least for me).

If you don't mind keeping the original cell then your
going on the right path. still I would sugges using the
vlookup function istead of having the actual values in
your nested IF's function. You can make a reference table
somewere in the workbook and then look for the meaning of
the 2 digit code. This way, when you update your table for
prices or new services, you don't have to mess with your
formulae. Example:

REFERENCE TABLE

A B C
1 R 1 Male, Regular 350.99
2 FP 1 Female, Post 412.99
3 DS 1 Dog, Small 59.99


This is in, say, a sheet named: DBSheet

And in Sheet1 in A1 you have A1: DS
So if you type in:
B1: =VLOOKUP(A1,DBSheet!$A$1:$C$3,2,0)
C1: =VLOOKUP(A1,DBSheet!$A$1:$C$3,3,0)

The results will be

B1: 1 Dog, Small
C1: 59.99

Hope this helps, if you still want to get rid of the
original cell and are willing to use code, pls post back.

Cheers
Juan
-----Original Message-----
Hi everybody,

I want to write a function for a friend of mines
Embaulming business to have Excel automatically change a
two letter code that he types in for a service, into it's
actual full word(s) as well as populate an amount field
with the correct price for the service rendered all in one
fell swoop. I have the two letter code working with the
populated field but I'm having trouble swapping out the
two letter code with the word(s).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top