+ Reply to Thread
Results 1 to 15 of 15

Changing prices to letters

  1. #1
    Registered User
    Join Date
    02-09-2013
    Location
    Mytown, USA
    MS-Off Ver
    Excel 2013
    Posts
    8

    Changing prices to letters

    My boss wants to convert our price column to a letter code. as in $4.50 would be DEI
    using this template:
    S I M P L Y W O R K
    1 2 3 4 5 6 7 8 9 0

    where each number becomes a number in the words simply work.

    Is there a way to create a formula or a macro the when the price is typed in a cell that it changes to the alphs code?

    Thanks
    Dan

  2. #2
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: Changing prices to letters

    Well to the forum

    Will this help =LOOKUP(B2, {1,5,10,15,20,25,30,35,40}, {"AA","AC","BA","BD","CA","CC","DA","DD","EA",0})
    Column A > put in $ then copy down
    Column B2 > type in say 5
    Column C2 > =LOOKUP(B2, {1,5,10,15,20,25,30,35,40}, {"AA","AC","BA","BD","CA","CC","DA","DD","EA",0}) You can change number and letter> Once done then copy down where you want to stop.
    Result > $5 would be AC

    Good Luck!
    To help you by my post? it would be nice to click on to say "Thank you".
    If you are happy with a solution to your problem?
    Click Thread Tools above your first post,
    select "Mark your thread as Solved".

  3. #3
    Registered User
    Join Date
    02-09-2013
    Location
    Mytown, USA
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Changing prices to letters

    Actually column E will have the prices, and any price entered will need to be changed to te corresponding letter.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,637

    Re: Changing prices to letters

    Quote Originally Posted by vcsindy View Post
    $4.50 would be DEI
    using this template:
    S I M P L Y W O R K
    1 2 3 4 5 6 7 8 9 0
    Can you explain why 450 would be "DEI"?
    Isn't it "PLK"?

  5. #5
    Registered User
    Join Date
    02-09-2013
    Location
    Mytown, USA
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Changing prices to letters

    Sorry You're right...PLK. How would I isert this formula

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,637

    Re: Changing prices to letters

    This will covert only numbers to the correspoding letters, ignoring no numeric characters.
    i.e.
    12xyz45 becomes "IMLY"

    Change any cell(s) in Col.E

    To a WorkSheet module in question.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-09-2013
    Location
    Mytown, USA
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Changing prices to letters

    tHANK yOU SO MUCH....hOW DO i USE IT? dO i PASTE IT TO THE CELL?

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,637

    Re: Changing prices to letters

    It is not a function used in cell.

    Try change any cell in Sheet1 Col.E in attached, you will see how it works.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    02-09-2013
    Location
    Mytown, USA
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Changing prices to letters

    Thank you thank you thank you!!! You are awesome

  10. #10
    Registered User
    Join Date
    02-09-2013
    Location
    Mytown, USA
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Changing prices to letters

    Is there anyway the 0 before the decimal can associate with the K so 450.00 will be LYK?

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,637

    Re: Changing prices to letters

    OOps

    1) Right click on the Sheet1 sheet tab
    2) select [View Code]

    Then you will see the codes in the right pane.

    Replace following one line
    Please Login or Register  to view this content.
    with following 2 lines
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    02-09-2013
    Location
    Mytown, USA
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Changing prices to letters

    One last question...can the script add the decimal and the code extends to the cents. such as $450.12 = plk.si
    Last edited by vcsindy; 02-10-2013 at 02:14 PM.

  13. #13
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,637

    Re: Changing prices to letters

    Replace the code with the following
    Please Login or Register  to view this content.

  14. #14
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Changing prices to letters

    @ jindon,

    Awesome!!!

  15. #15
    Registered User
    Join Date
    02-23-2022
    Location
    Langley
    MS-Off Ver
    365
    Posts
    1

    Re: Changing prices to letters

    Is there a way to convert the number from the left column to the aphabets. Ex cell B1 is 1, it automatically produces the result S in cell C1. (using SIMPLYWORK as the example)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1