+ Reply to Thread
Results 1 to 11 of 11

Assigning Numerical Values to Letters and Multiplying Them

  1. #1
    Registered User
    Join Date
    08-16-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Assigning Numerical Values to Letters and Multiplying Them

    I have two columns with the possible letter entries of "L", "M", and "H"; the numerical values for each will be 1, 3, and 5, respectively. I want to multiply the values in those two columns, with the numerical value displayed in a third column. I have modified the following formula - =SUM(COUNTIF(H4:I4,"L")*1+COUNTIF(H4:I4,"M")*3+COUNTIF(H4:I4,"H")*5) - and replaced SUM with PRODUCT, as well as replacing the "+" with "*", both to no avail. I would appreciate any assistance on this issue. Thank you.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Assigning Numerical Values to Letters and Multiplying Them

    DNAguy,

    Welcome to the forum!
    In the original formula, it is redundant to have both Sum() and the + symbols, not sure why its like that to begin with. Also, assuming the numerical value in the 3rd column is column J so in this case it would be J4:
    Please Login or Register  to view this content.
    The reason for the MAX's is so that the formula doesn't result in a 0 because there are no L's. 0 * the rest would result in a 0 regardless of what the rest is. Using Max forces it to be 1 * the rest if there are no L's (or M's or H's).
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Contributor CheshireCat's Avatar
    Join Date
    10-11-2011
    Location
    Victoria, Canada
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    258

    Re: Assigning Numerical Values to Letters and Multiplying Them

    How about:

    Please Login or Register  to view this content.
    Docendo discimus.

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Assigning Numerical Values to Letters and Multiplying Them

    Quote Originally Posted by DNAguy View Post
    I have two columns with the possible letter entries of "L", "M", and "H"; the numerical values for each will be 1, 3, and 5, respectively. I want to multiply the values in those two columns, with the numerical value displayed in a third column.
    Can you clarify. Are you adding the letter values and then multiplying by the third value? For example if H4 = "M", I4 = "H" and J4 = 2 what's the result, is it (3+5)*2 = 16?

    Are you doing this row by row or do you want a formula for the total for multiple rows?

    A small example would be helpful......
    Audere est facere

  5. #5
    Registered User
    Join Date
    08-16-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Assigning Numerical Values to Letters and Multiplying Them

    tigeravatar,

    Thank you for the quick response. I copied the formula into my target cell (J4), and received a value of "0" after having an "H" in both the entry cells (H4 and I4); the value should display "25". I am attaching my spreadsheet for your reference.

    DNAguy

    Book1.xls

  6. #6
    Registered User
    Join Date
    08-16-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Assigning Numerical Values to Letters and Multiplying Them

    Quote Originally Posted by CheshireCat View Post
    How about:

    Please Login or Register  to view this content.
    CheshireCat,

    Thank you for the assist. The formula worked great, just what I needed. I'm so glad I found this helpful forum.

    DNAguy

    ---------- Post added at 03:12 PM ---------- Previous post was at 03:11 PM ----------

    Quote Originally Posted by daddylonglegs View Post
    Can you clarify. Are you adding the letter values and then multiplying by the third value? For example if H4 = "M", I4 = "H" and J4 = 2 what's the result, is it (3+5)*2 = 16?

    Are you doing this row by row or do you want a formula for the total for multiple rows?

    A small example would be helpful......
    daddylonglegs,

    I attached my file to my response to tigeravatar. CheshireCat's formula worked great, but any other solutions are welcome so that I can continue to learn more about Excel.

    DNAguy

  7. #7
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Assigning Numerical Values to Letters and Multiplying Them

    Alternate formulas:
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    But I'm confused on this:
    Quote Originally Posted by DNAguy View Post
    I want to multiply the values in those two columns, with the numerical value displayed in a third column
    I don't see a third column to multiply by at all.

    I assumed the third column was column J that you wanted to multiply by, so my formula had a reference to J4. In the example workbook, you put the formula in cell J4 which caused a circular reference resulting in a value of 0.

    Do you have a third column to multiply by?

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Assigning Numerical Values to Letters and Multiplying Them

    OK, I think I misunderstood,

    Another way would be to use this formula

    =IF(H4="L",1,IF(H4="M",3,5))*IF(I4="L",1,IF(I4="M",3,5))

    ---------- Post added at 11:27 PM ---------- Previous post was at 11:24 PM ----------

    Quote Originally Posted by tigeravatar View Post
    But I'm confused on this......
    I read it the same way, ta

    I assume the third column is where the result should go......

  9. #9
    Registered User
    Join Date
    08-16-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Assigning Numerical Values to Letters and Multiplying Them

    tigeravatar,

    Sorry about the confusion. What I meant to say was that I wanted the value from multiplying the H and I columns to be displayed in a third column, which would be J, which is where the formula would reside anyways. My bad.

    DNAguy

  10. #10
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Assigning Numerical Values to Letters and Multiplying Them

    Quote Originally Posted by daddylonglegs View Post
    I assume the third column is where the result should go......
    Ohhhh, ok. That makes sense then, lol.

  11. #11
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Assigning Numerical Values to Letters and Multiplying Them

    @ DNAguy

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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