+ Reply to Thread
Results 1 to 3 of 3

Add cells with letter values assigned a number

  1. #1
    Registered User
    Join Date
    02-04-2013
    Location
    Illinois
    MS-Off Ver
    Excel 2010
    Posts
    3

    Add cells with letter values assigned a number

    Hey everyone, hoping someone can help me here.

    I have created a sheet that is going to be used to mark various inventory items returned, not returned, or damaged. If they are not returned or damaged, I need to charge the person the value of the items so I am trying to create a final total of amount due for each person. I was going to just use the letters "d" for damaged, "n" for not returned, and "y" for returned. Each column is going to have a different price value however so I can't just assign a value to each letter.

    For example, I have tried =Sum(If(A2:A30 = "d" or "n", 380, 0), If(B2:B30 = "d" or "n", 20, 0)). I get an error every time I do this however. The error appears to be related to the "or" . If I run the formula without the "or" it works. I need to run the formula for 2 values though.

    What am I doing wrong or is there a better way I could be doing this?

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Add cells with letter values assigned a number

    =380*(countif(A2:A30,"d")+countif(A2:a3,"n"))+20*(countif(B2:B30,"d")+countif(B2:B30,"n"))

    (There must be something shorter though)

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Add cells with letter values assigned a number

    maybe this

    =380*SUM(COUNTIF(A2:A30,{"d","n"})+20*SUM(COUNTIF(B2:B30,{"d","n"})))
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

+ 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. adding the number of a letter in cells
    By superdraft in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-09-2013, 08:34 AM
  2. Can you insert a letter/number in multiple cells?
    By ChristensenM in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 10-13-2011, 07:50 AM
  3. Excel 2007 : Averaging number & letter values
    By RobinHolly in forum Excel General
    Replies: 5
    Last Post: 07-29-2010, 01:41 PM
  4. Replies: 17
    Last Post: 07-16-2009, 03:12 AM
  5. Format:change headers from letter to number/number to letter
    By Biff in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 04:05 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