+ Reply to Thread
Results 1 to 11 of 11

If and rank

  1. #1
    Registered User
    Join Date
    07-25-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    10

    If and rank

    Hi Everyone,

    My first posting and i sincerely hope someone can help me.
    I have a table with a group of student names from cell m10 to m50, the results scores are given from 0 TO 5(Maximum score) from cell r10 to r50

    1) i need a formula where i can know which students name appears on cell B20 on which ranks based on the results and name the students have scored highest and or more than 2 or have score 0
    and names of the students that have score 1. Kindly note that i need the students name and their scores results beside them

    i have been struggling on this for the pass few days and any help will be greatly appreciated

    Sincerely

    Junior123

  2. #2
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: If and rank

    Hi Junior123, welcome to our family!

    Could you please attach a sample file with desired results? Use dummy data if you have ay confidential information.

    To attach a file, on bottom click 'Go Advanced' then 'Manage Attachments' top right side 'Add Files' & follow the instructions, then right bottom click 'Done' submit reply.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  3. #3
    Registered User
    Join Date
    07-25-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: If and rank

    Hello Mr Hasseb,

    Firstly, let me Thank you for the prompt reply.
    I have attached a demo worksheet in this email. Please note that the names in these sheet and their scores are frictional but hopely you could understand what i'm doing here.
    If you need more clarifications, please do let me know

    Thanks

    Junior123
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: If and rank

    Junior123,

    If you need results in a single cell will require VBA. If you are OK with formula, please see the attached. You can move this to a separate sheet, if you wish. so that way you can have one sheet for data entry, 2nd one for sorting. Adjust the ranges in formulas.

    Hope this helps you.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-25-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: If and rank

    Hello Mr Haseeb,

    Thanks...it worked on certain occations as i noticed a problem by ranking them
    May i kindly ask,

    1) If i wanted to do the same but without ranking them how will the formula be? ;- Meaning, i want cell B20 to have results which can have those more than 2 marks and pick up like e.g all the students scored only 1 and pickup results students have scored 0.

    2) I have done in it using conditional format where those results which i have picked up are highligted through coloured cell. What i actually want to show on cell B20 are all those picked up by the conditional format(>2, 0 and all 1), the scores to be appeared there and name.

    If possibile i do not wish to use VBA.

    Hope this is not too confusing.

    Please advise


    Junior 123

  6. #6
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: If and rank

    Results in a single cell will require VBA. I don't know much about VBA. I will post a link in "Cavalry thread", so some Gurus will have answer for you.

  7. #7
    Registered User
    Join Date
    07-25-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: If and rank

    Hello Haseeb,

    Once Again my sincere Thanks for helping post the link so that the other guru's can render their assitances.

    as i'm not a big fan of using VBA..since if the users do not enable their marco which normally most people do not even if it is digititally signed. Moreover excel VBA even with Password protected is quite easily cracked.
    But can i ask, i have managed to use both Index and Match to get this data on a single cell...

    {=INDEX(M$21:M$50,MATCH(MAX(R$21:R$50),R$21:R$50,0))&INDEX(M$21:M$50,MATCH(MINA(R$21:R$50),R$21:R$50,0))}

    And need some expect advise, i tried the above it can pick out the highest and lowest value in my data which is great..
    1) in cell b20 I wanted to separate the names, in between them, as currently it appears as Sally and Lay Hong together...so how do i add a either a "," or "/" between them?
    2) but i need to more conditions and tried using if formula but end up with errors..., so if i need to add an if condition on top of this formula that if R21:R50 is "1" "students have to retake the test".


    Please kindly advise

    Junior123

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

    Re: If and rank

    junior123,

    Unfortunately, Excel's native CONCATENATE() function doens't work with arrays. This means that there is no way Excel can perform what you're asking for without the use of VBA or an add-in. I recommend the Morefunc add-in which provides the MCONCAT and VSORT functions which are designed for exactly this task.

    Using your example workbook, once you have MoreFunc installed and have added the Morefunc.xll as an add-in, use this array formula in cell B20:
    Please Login or Register  to view this content.

    Note that array formulas must be confirmed with Ctrl+Shift+Enter and not just enter. That's how the formula gets surrounded by curly braces {}. Do not try to add those yourself.
    Hope that helps,
    ~tigeravatar

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

  9. #9
    Registered User
    Join Date
    07-25-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: If and rank

    Dear Sir Tigeravatar,

    You are the Best!!
    Since it my first time using this function, how do i add more conditions to it, for e.g, I want to choose all the lowest marks e.g 0
    OR Students whom scored all 1 in their test to redo the test...could you please guide me through this.

    Please advise

    Junior 123

  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: If and rank

    junior123,

    Sorry for the delayed response, haven't had a chance to get back to this thread until now.

    Quote Originally Posted by junior123 View Post
    I want to choose all the lowest marks e.g 0
    OR Students whom scored all 1 in their test to redo the test
    I took this to mean you want to find only the students who scored a 0 or 1 and list them in a single cell as described above. You would do that with this array formula (using your example workbook):
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    07-25-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: If and rank

    Dear Tigeravater,

    Thanks for the reply, i have managed to resolved the problem...My sincere Thanks to you and Hasseb for helping me to resolve this.
    And My note of Thanks to all the them whom contributes their ideas...this is one of the best forum...Let us keep this going


    Junior 123

+ 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