+ Reply to Thread
Results 1 to 13 of 13

Formula for calculating the scrabble value of Welsh words

  1. #1
    Registered User
    Join Date
    10-19-2021
    Location
    Maesteg, Wales
    MS-Off Ver
    Office 2019
    Posts
    6

    Formula for calculating the scrabble value of Welsh words

    Hi,

    I'm looking to calculate the scrabble value of some Welsh vocabulary in a worksheet.

    I found a method of doing that for English words (see below) which works well, but the problem I have is that Welsh has letters made of dual characters like ff, rh, ng, ph, ll which have separate values to letters made up of the characters by themselves.

    The value of ffwrn for instance should be 7, but it's coming back as 10.

    Is there a formula I could use that could correctly count the scrabble value of Welsh words with dual character letters?


    Thanks!

    ------

    Welsh scrabble values are as follows:

    a 1
    b 3
    c 4
    ch 5
    d 1
    dd 1
    e 1
    f 2
    ff 4
    g 2
    ng 10
    h 4
    i 1
    j 10
    l 2
    ll 5
    m 3
    n 1
    o 1
    p 5
    ph 10
    r 1
    rh 10
    s 3
    t 3
    th 4
    u 2
    w 1
    y 1

    ----

    English scrabble method from PC Review Forum

    Put this table in G1:H26
    A 1
    B 3
    C 3
    D 2
    E 1
    F 4
    G 2
    H 4
    I 1
    J 8
    K 5
    L 1
    M 3
    N 1
    O 1
    P 3
    Q 10
    R 1
    S 1
    T 1
    U 1
    V 4
    W 4
    X 8
    Y 4
    Z 10

    Then....for a word in A1

    This formula calculates its scrabble value
    B1:
    =SUMPRODUCT(LOOKUP(MID(A1,ROW($A$1:INDEX($A:$A,LEN(A1),1)),1),$G$1:$G$26,$H$1:$H$26))

    Is that something you can work with?
    ***********
    Regards,
    Ron

    XL2002, WinXP

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Formula for calculating the scrabble value of Welsh words

    Hi Ron,

    Double letters make life harder (probably not only in scrabble :-P) so I dont think you can easily adopt the formula from EN version.

    My proposition is: sort table with letter values with double letters on the top (I've sorted also by descending values, but it is not necessary)
    then in A2 use
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    which would remove first letter on the list from the word. If lenght of received this way word is shorter than the original, the letter (or several of them) appeared in the word). To count their scrabble value use in B2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    (lenght change multiplied by letter value divided length of the letter (so change of the length = 2 for double letters is counted as one)
    then copy these 2 formulas down to row 30 (as there are 29 letters in alphabet) and ib B1 sum the values from B column.

    Of course less elegant than original formula.

    See also in sheet2 how we can benefit of having some letters worth 1 (an why I sorted also by value).

    PS. I am a bit confused by your profile vs. the footer of the message - are you using Excel 2002 or 2019 (or may be 365?)
    Attached Files Attached Files
    Best Regards,

    Kaper

  3. #3
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: Formula for calculating the scrabble value of Welsh words

    I agree with Kaper... the double letters cause a problem. They are handled easily by Scrabble because each letter (whether single or double) is on its own tile. You, on the other hand, appear to want to write the word out within a single cell. That raises a question about double-letters in Welsh. Let's use "d" and "dd" as an example. In English, double letters can occur where each one is an individual separate letter (for example the "d" in "middle"). My question (which applies to "f" and "l" as well)... can you ever had "dd" in a word where the each "d" is an individual letter or is "dd" automatically a "single" letter when it appears?

    EDIT NOTE: I see you marked this question solved, but I would still like to know the answer to my question above.
    Last edited by Rick Rothstein; 10-20-2021 at 05:32 PM.

  4. #4
    Registered User
    Join Date
    10-19-2021
    Location
    Maesteg, Wales
    MS-Off Ver
    Office 2019
    Posts
    6

    Re: Formula for calculating the scrabble value of Welsh words

    In Welsh, as far as I know, dd is automatically a single letter when it appears, as are the other double character letters.

  5. #5
    Registered User
    Join Date
    10-19-2021
    Location
    Maesteg, Wales
    MS-Off Ver
    Office 2019
    Posts
    6

    Re: Formula for calculating the scrabble value of Welsh words

    Thanks! This works perfectly.

    Apologies for the confusion - Ron was the person who gave the EN solution I just copied it into the post and didn't think about the fact that it made it look like Ron had written this post!

    I'm using Excel 2019.

  6. #6
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Formula for calculating the scrabble value of Welsh words

    Funny plot twist with Ron / XL2002

    Thanks for marking thread solved and for a reputation point.

    @Rick: Not about Welsh double letters, but in Polish we do have double letters too like sz in proper name of my home city: Warszawa . But in scrable we don't have "sz" tile. We have to use s and z tiles. But to make life harder, we do have special lettrs like for instance slashed l, and e with a hook in our ex-president known in the world as Lech Walesa, while his name shall be written Wałęsa (I wonder if you can see these characters).

    Just for those curious two stock images of Welsh and Polish tiles:
    https://www.alamy.com/stock-photo-we...-10852254.html
    https://www.picfair.com/pics/0165926...scrabble-tiles

  7. #7
    Registered User
    Join Date
    10-19-2021
    Location
    Maesteg, Wales
    MS-Off Ver
    Office 2019
    Posts
    6

    Re: Formula for calculating the scrabble value of Welsh words

    Update

    I found a different solution that uses nested substitute formulas in adjacent columns to split a word into its individual letters and double letters and then v-lookup to calculate the total scrabble value. I put the double letters in one sheet and the scrabble values of the letters (including special characters like ô, ï etc in another.

    The formulas are incredibly long (especially the formula at Z3) and I think there is probably a way to simplify them...but it works.

    I also think it could be adapted to other languages easily by changing the double letters and the letters in the scrabble value sheet.

    I'm quite pleased with it.

    Formulas

    Word in A2, Value in B2, Letters in C3-Z3

    Letter 1
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Letter 2
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Letter 3
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    etc

    Value
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Scipiana055; 11-17-2021 at 01:08 PM.

  8. #8
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: Formula for calculating the scrabble value of Welsh words

    I decided to take a try at this. What I developed is a UDF (user defined function) that I am pretty sure will correctly score Welsh words. Give it a try with real Welsh words that you know the correct Scrabble score for and let me know how it did. Here is the UDF that I came up with...
    Please Login or Register  to view this content.
    HOW TO INSTALL UDFs
    ------------------------------------
    If you are new to UDFs, they are easy to install and use. To install it, simply press ALT+F11 to go into the VB editor and, once there, click Insert/Module on its menu bar, then copy/paste the above code into the code window that just opened up. That's it.... you are done. You can now use NameOfTheUDF just like it was a built-in Excel function. For example,

    =WelshScore(A1)

    If you are using XL2007 or above, make sure you save your file as an "Excel Macro-Enabled Workbook (*.xlsm) and answer the "do you want to enable macros" question as "yes" or "OK" (depending on the button label for your version of Excel) the next time you open your workbook.
    Last edited by Rick Rothstein; 11-17-2021 at 05:34 PM.

  9. #9
    Registered User
    Join Date
    10-19-2021
    Location
    Maesteg, Wales
    MS-Off Ver
    Office 2019
    Posts
    6

    Re: Formula for calculating the scrabble value of Welsh words

    This is a really elegant solution! Thanks.

    The only issue I found with the calculations is the special characters. I can add most of them to the string, but I haven't found a way to add these (ŵẃẁẅŷỳýÿ) (ŵ is one of the most common)

    Is there a way to deal with these?

    Thanks!

  10. #10
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: Formula for calculating the scrabble value of Welsh words

    Quote Originally Posted by Scipiana055 View Post
    The only issue I found with the calculations is the special characters. I can add most of them to the string, but I haven't found a way to add these (ŵẃẁẅŷỳýÿ) (ŵ is one of the most common)
    Are you referring to the code I posted? My function used the Welsh alphabet you posted originally... those characters with the marks over them were not shown as being part of the alphabet that needed to be scored. Is your comment related to a different language other than Welsh? If so, can you list the complete alphabet (there may be issues with positions in the string that might need to be accounted for) and the tile values for them (like you did in your original post)?

  11. #11
    Registered User
    Join Date
    10-19-2021
    Location
    Maesteg, Wales
    MS-Off Ver
    Office 2019
    Posts
    6

    Re: Formula for calculating the scrabble value of Welsh words

    Quote Originally Posted by Rick Rothstein View Post
    Are you referring to the code I posted? My function used the Welsh alphabet you posted originally... those characters with the marks over them were not shown as being part of the alphabet that needed to be scored. Is your comment related to a different language other than Welsh? If so, can you list the complete alphabet (there may be issues with positions in the string that might need to be accounted for) and the tile values for them (like you did in your original post)?
    Apologies for the lack of clarity - I'm not used to how the forum works...

    Yes. I was referring to your code. The comment is related to Welsh - when I initially commented I wasn't thinking about accented characters. I added them into my sample workbook later.

    Here are the values (for completeness I've added uppercase underneath as well):

    a 1
    á 1
    à 1
    ä 1
    ã 1
    â 1
    b 3
    c 4
    ç 4
    ch 5
    d 1
    dd 1
    e 1
    é 1
    è 1
    ë 1
    ẽ 1
    ê 1
    f 2
    ff 4
    g 2
    ng 10
    h 4
    i 1
    í 1
    ì 1
    ï 1
    ĩ 1
    î 1
    j 10
    l 2
    ll 5
    m 3
    n 1
    ñ 1
    o 1
    ó 1
    ò 1
    ö 1
    õ 1
    ô 1
    p 5
    ph 10
    r 1
    rh 10
    s 3
    t 3
    th 4
    u 2
    ú 2
    ù 2
    ü 2
    ũ 2
    û 1
    w 1
    ẃ 1
    ẁ 1
    ẅ 1
    ŵ 1
    y 1
    ý 1
    ỳ 1
    ÿ 1
    ỹ 1
    ŷ 1
    A 1
    Á 1
    À 1
    Ä 1
    Ã 1
    Â 1
    B 3
    C 4
    Ç 4
    Ch 5
    D 1
    Dd 1
    E 1
    É 1
    È 1
    Ë 1
    Ẽ 1
    Ê 1
    F 2
    Ff 4
    G 2
    Ng 10
    H 4
    I 1
    Í 1
    Ì 1
    Ï 1
    Ĩ 1
    Î 1
    J 10
    L 2
    Ll 5
    M 3
    N 1
    Ñ 1
    O 1
    Ó 1
    Ò 1
    Ö 1
    Õ 1
    Ô 1
    P 5
    Ph 10
    R 1
    Rh 10
    S 3
    T 3
    Th 4
    U 2
    Ú 2
    Ù 2
    Ü 2
    Ũ 2
    Û 1
    W 1
    Ẃ 1
    Ẁ 1
    Ẅ 1
    Ŵ 1
    Y 1
    Ý 1
    Ỳ 1
    Ÿ 1
    Ỹ 1
    Ŷ 1

  12. #12
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: Formula for calculating the scrabble value of Welsh words

    Untested but I think this should work correctly...
    Please Login or Register  to view this content.

  13. #13
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: Formula for calculating the scrabble value of Welsh words

    I take it back... the last code I posted does not work correctly. Why? Because I cannot seem to get VB to hold about 6 of your accented characters (it changes them into question marks). Excel can hold them but VB cannot. Let me think about it and see if I can come up with a work-around.
    Last edited by Rick Rothstein; 11-19-2021 at 11:37 PM.

+ 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. Challenge: Simple Scrabble game in VBA
    By vipe110 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-26-2018, 11:17 PM
  2. Internation Scrabble Scores macro
    By makinmomb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-28-2017, 02:45 PM
  3. Scrabble Game macro collections
    By makinmomb in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-24-2017, 02:09 AM
  4. [SOLVED] Finding the scrabble wildcard
    By makinmomb in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-31-2017, 06:04 AM
  5. [SOLVED] Scrabble stop watch
    By makinmomb in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-18-2017, 01:24 PM
  6. [SOLVED] Scrabble hooks summary
    By makinmomb in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-10-2017, 10:04 AM
  7. scrabble hook macro
    By makinmomb in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-28-2016, 02:59 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