+ Reply to Thread
Results 1 to 10 of 10

need function to read letters as numbers

  1. #1
    Registered User
    Join Date
    03-04-2021
    Location
    Bratislava, Slovakia
    MS-Off Ver
    Microsoft Excel 97-2003
    Posts
    5

    need function to read letters as numbers

    I need help with creating function or giving me advice how to do it easy way. What I need is - there is a table with employers attendance in work, so when someone is in work I put there the number of hours they are in work - it will sub it to monthly result which is working. What I need is when someone is not at work from whatever reason I write some of the abbreviations Im using and I need excel to read those abbreviations as numbers I can preset. For example: if I write "D" I want excel to read it as 11,5 and then sub it. Im using 7 different abbreviations with different numbers. At last I have 3 different monthly results so if I write only number the result (sub of those no) would go to all 3 results which is working just fine, but if i write any of those abbreviations I want excel to sub it only to 2 of those monthly results. Can someone, please, help me with this?

    I've tried to make my own function but it doesn't work nor using COLUMN(INDIRECT(.....))

    Thanks in advance.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,017

    Re: need function to read letters as numbers

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,496

    Re: need function to read letters as numbers

    Assum D=11.5; E=10; F=5;...in "range"
    Something like this:
    =COUNTIF("range","D")*11.5+COUNTIF("range","E")*10+COUNTIF("range","F")*5

    or, shorter:

    =SUMPRODUCT(COUNTIF("range",{"D","E","F"})*{11.5,10,5})
    Quang PT

  4. #4
    Registered User
    Join Date
    03-04-2021
    Location
    Bratislava, Slovakia
    MS-Off Ver
    Microsoft Excel 97-2003
    Posts
    5

    Re: need function to read letters as numbers

    This is how it looks, so when I write any number it should sub it to all 3 results (overall, overtime, payment).
    When I write any of abbreviations, which values are there, I need it to sub results only in overall and overtime not payment.
    Every hour I write there are payed directly but every time someone is not in work, they have to be somewhere (holiday, doctor etc) but that time is not payed directly by me so it wont go to payment,
    only to overall time and overtime.
    Attached Files Attached Files

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,496

    Re: need function to read letters as numbers

    Are you using Ex 97-2003 ?

  6. #6
    Registered User
    Join Date
    03-04-2021
    Location
    Bratislava, Slovakia
    MS-Off Ver
    Microsoft Excel 97-2003
    Posts
    5

    Re: need function to read letters as numbers

    yes, here in work we are using this old version

  7. #7
    Registered User
    Join Date
    03-04-2021
    Location
    Bratislava, Slovakia
    MS-Off Ver
    Microsoft Excel 97-2003
    Posts
    5

    Re: need function to read letters as numbers

    Also, back to those abbreviations, if there are any i need it to sum it to those two results with all numbers I write not only abbreviations

  8. #8
    Registered User
    Join Date
    03-04-2021
    Location
    Bratislava, Slovakia
    MS-Off Ver
    Microsoft Excel 97-2003
    Posts
    5

    Re: need function to read letters as numbers

    Quote Originally Posted by bebo021999 View Post
    Assum D=11.5; E=10; F=5;...in "range"
    Something like this:
    =COUNTIF("range","D")*11.5+COUNTIF("range","E")*10+COUNTIF("range","F")*5

    or, shorter:

    =SUMPRODUCT(COUNTIF("range",{"D","E","F"})*{11.5,10,5})
    I've tried this:
    =SUMPRODUCT(COUNTIF("C4:AG4",{"D","PN","OČ","RP","P","PP","ŠK"})*{11.5,7.5,7.5,8,11.5,7.5,7.5})
    but it doesn't work, it says that there is a mistake

  9. #9
    Registered User
    Join Date
    12-04-2020
    Location
    Bangkok
    MS-Off Ver
    365
    Posts
    61

    Re: need function to read letters as numbers

    Please try this,

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  10. #10
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,496

    Re: need function to read letters as numbers

    Quote Originally Posted by PalinoooSVK View Post
    I've tried this:
    =SUMPRODUCT(COUNTIF("C4:AG4",{"D","PN","OČ","RP","P","PP","ŠK"})*{11.5,7.5,7.5,8,11.5,7.5,7.5})
    but it doesn't work, it says that there is a mistake
    Try to replace "C4:AG4" (string) by C4:AG4 (reference)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Search Button - Finds Part Numbers with numbers, letters and characters
    By Kyhosa in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-13-2021, 12:28 PM
  2. Replies: 1
    Last Post: 08-27-2014, 11:05 AM
  3. Replies: 13
    Last Post: 07-30-2014, 12:03 PM
  4. Parsing Letters and Numbers (And Letters)
    By jontran718 in forum Excel General
    Replies: 6
    Last Post: 01-12-2012, 12:55 PM
  5. Replies: 2
    Last Post: 12-01-2010, 02:29 PM
  6. Function to Generate Random Numbers and Letters
    By jason_kelly in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-14-2010, 03:39 PM
  7. changing numbers to letters (IF function?)
    By molemeister in forum Excel General
    Replies: 1
    Last Post: 04-24-2010, 08:55 AM

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