+ Reply to Thread
Results 1 to 7 of 7

Average over a text range using a vlookup In Column 2nd

  1. #1
    Registered User
    Join Date
    09-07-2010
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    5

    Average over a text range using a vlookup In Column 2nd

    Hi,

    i have posted it before and thought the problem was solved until i used the formula in a large spreadsheet and the return value didn't seem right!

    i am trying convert Text in the numeric value and get the average

    =SUMPRODUCT(SUMIF('grade Sheet'!$A$1:$A$24,$A$1:$A$8,'grade Sheet'!$B$1:$B$24))/COUNTA($A$1:$A$8)

    i was using the above and it worked perfectly in a smaller spreadsheet, however it seems it is only return the value in certain array. when i used it in a more complex spreadsheet it didn't work

    also i would like it to ignore all the "NA" as it divide to get the average value

    i have attached the spreadsheet -

    please help
    Attached Files Attached Files

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Average over a text range using a vlookup In Column 2nd

    The formula you're using in present form does not make a great deal of sense for a few reasons:

    Your SUMIF ranges are inconsistent (A2:A9153 and B2:B153 - either/or is a typo - presumably the former)

    Your determining the divisor based on Col F (Result) whereas you're basing the SUM of Grade points on Col B (Attainment Grade).
    Either you should be using F or if you do want to use B you should discount the values in B according to NA status of F

    SUMIF is not a case sensitive search - so A/a will be treated as identical (and aggregated)

    You have identical values repeated in your table - eg A:G & U are listed twice over in upper case form on Grade Sheet
    Post back with your comments on the above.

  3. #3
    Registered User
    Join Date
    09-07-2010
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Average over a text range using a vlookup In Column 2nd

    Hi DonkeyOte,

    thanks for you reply!

    yes - it was a typo, it should be 'grade Sheet'!$A$2:$A$153

    you replied a very similar question posted by me 2 days ago. so glad to see you and offer help again!!

    what i wanted to do was - i wanted to covert the "Result" into numeric and work out the average. In order to do that i have created another sheet for vlookup, but becos there are more that 20 sheets in that excel file and it would take ages to covert all and get the average. so i posted the question and you replied and suggested this formula. i tried with the attachment (which only has the a few grade and a separate sheet called "grade sheet") worked perfectly fine. however as i use it on the actual one it seemed the return value didnt make sense.

    please see the attachment - hope it makes more sense
    Attached Files Attached Files

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Average over a text range using a vlookup In Column 2nd

    Please answer all of those questions asked in post # 2 (with exception of range typo which was a given)

    In short I understand what you want to do, however, you first have to address some flaws in design or clarify the logic before we can progress any further.

  5. #5
    Registered User
    Join Date
    09-07-2010
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Average over a text range using a vlookup In Column 2nd

    Your determining the divisor based on Col F (Result) whereas you're basing the SUM of Grade points on Col B (Attainment Grade).
    Either you should be using F or if you do want to use B you should discount the values in B according to NA status of F

    i think i can manually delete all record marked "NA"

    SUMIF is not a case sensitive search - so A/a will be treated as identical (and aggregated)

    i dunno, am i correct, but i thought it work in vlookup it should work in SUMIF or not??

    You have identical values repeated in your table - eg A:G & U are listed twice over in upper case form on Grade Sheet

    you mean "grade sheet" row 145-153. yes, i will delete them ( cos i have been editing using and adding more grade )

    any suggestion would be grateful to solve this mysteries

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Average over a text range using a vlookup In Column 2nd

    Quote Originally Posted by Kenneth1024
    i think i can manually delete all record marked "NA"
    That wasn't the question.

    Your present SUMIF formula is referencing Column B to determine point allocation whereas your "expected result" (based on "convert value" column) is using Column F.
    The question then was: should you be using the grade marks in Col B or Col F to determine the point allocations ?
    (note also that in your example you have NA in F9:F10 and yet have assigned those points in your "covert value" columns - presumably incorrectly ?)

    Quote Originally Posted by kenneth1024
    i dunno, am i correct, but i thought it work in vlookup it should work in SUMIF or not??
    VLOOKUP is not case sensitive.

    Consider:

    Please Login or Register  to view this content.
    Quote Originally Posted by kenneth1024
    you mean "grade sheet" row 145-153. yes, i will delete them ( cos i have been editing using and adding more grade )
    OK - the fact they are duplicates & superfluous is a good thing.

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Average over a text range using a vlookup In Column 2nd

    kenneth1024, you never posted back regards my other questions but for sake of others who may come across this in later searches...

    If we assume that you do mean to Average the grades assigned to Column F (NA to be excluded) then:

    Please Login or Register  to view this content.

+ 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