+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Help with IF or LOOKUP function

  1. #1
    Registered User
    Join Date
    02-04-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    12

    Help with IF or LOOKUP function

    I'm not sure quite how to do this.

    I have a column (Column A) of items that are selected from a drop down list.

    Here are the options from that list. Math, Science, English, Art

    I want to write a formula that says, If column A = Math, then enter the adjacent total number of students from Column B.

    In column B, these totals would be user entered based on the option selected in column A.

    So I want to know what the total number of students in Math (Column A) from column B and then add the total of those and put it in another cell. So it would look up every time Math appears in column A, then it would look at the adjacent cell in column B to find the number associated with it, and then it would add those numbers up and give a total.

    TIA.
    Last edited by Not You; 02-05-2012 at 12:01 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Help with IF or LOOKUP function

    A sample file with what you have and what you want would make it easier to help you?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    02-04-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    12
    Here you go, thanks.

    I should add that I'm not looking to do a simple SUM calculation, I want Excel to find every time it says "Math" in column A, and add the number of students adjacent to it in column B for a running total.
    Attached Files Attached Files
    Last edited by Not You; 02-05-2012 at 12:11 PM.

  4. #4
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Help with IF or LOOKUP function

    Hello
    The SUMIf function in cell D9 copied across to G9 should give you the results you're looking for.

    =SUMIF($A$3:$A$24,D$8,$B$3:$B$24)

    Hope this helps.

  5. #5
    Registered User
    Join Date
    02-04-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: Help with IF or LOOKUP function

    I stand corrected that is a very simple IF function and works great, thank you.

+ 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