+ Reply to Thread
Results 1 to 8 of 8

Assign Value to Letters for Averaging

Hybrid View

  1. #1
    Registered User
    Join Date
    10-13-2009
    Location
    PA
    MS-Off Ver
    Excel 2007
    Posts
    75

    Assign Value to Letters for Averaging

    I'm looking for a way to assign values to letters so I can average columns but retain the letters in the column. I've been able to successfully overwrite my letters with appropriate values and subsequently avg, but that's not what I'm looking to do.

    I've attached a sample of what I'm trying to accomplish. I'm looking to keep a running average of each column on the right where D=1, P=2, and M=3.

    Sidenote: File isn't as diabolical as it may seem Trying to put something together for employees to keep their own running tab of accomplishments so they are actually prepared for reviews.

    Edit: Fixed attachment.
    Attached Files Attached Files
    Last edited by thesonofdarwin; 04-09-2010 at 09:44 PM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Assign Value to Letters for Averaging

    There's no data in your sheet, just headers. It is not obvious what you want to average. Fill in some data and manually create the expected result.

  3. #3
    Registered User
    Join Date
    10-13-2009
    Location
    PA
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: Assign Value to Letters for Averaging

    Quote Originally Posted by teylyn View Post
    There's no data in your sheet, just headers. It is not obvious what you want to average. Fill in some data and manually create the expected result.
    Sorry, I noticed that as I was closing excel. The dreaded not remembering to save files. It's already fixed.

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Assign Value to Letters for Averaging

    What is the expected result for the sample?

  5. #5
    Registered User
    Join Date
    10-13-2009
    Location
    PA
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: Assign Value to Letters for Averaging

    The result would go under the Averages column L1 where each cell would keep a running average of the corresponding column. So L2 =AVERAGE(C:C), L3 =AVERAGE(D:D), and so on. Expected result would be a value between 1 and 3 as D=1, P=2, M=3.

  6. #6
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Assign Value to Letters for Averaging

    Maybe like this in L2, adapt column references for the other averages

    =(COUNTIF(C:C,"D")+(COUNTIF(C:C,"P")*2)+(COUNTIF(C:C,"M")*3))/COUNTA(C:C)

  7. #7
    Registered User
    Join Date
    10-13-2009
    Location
    PA
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: Assign Value to Letters for Averaging

    That works perfectly! I just altered the count to subtract the header:

    =(COUNTIF(C:C,"D")+(COUNTIF(C:C,"P")*2)+(COUNTIF(C:C,"M")*3))/(COUNTA(C:C)-1)

    Thanks so much for the quick response. I was trying many things from defining a table and using vlookups.

    This is much more succinct and logical. Thanks

  8. #8
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Assign Value to Letters for Averaging

    I was just coming back here to correct the formula, since the header cont only just struck me. Good on ya for picking it up yourself.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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