+ Reply to Thread
Results 1 to 5 of 5

Thread: Help with IF or LOOKUP function

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

    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 11:01 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2007
    Posts
    996

    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?
    Please

    [1] Use code tags. Place "[ code ]" before the first line of code and "[/code]" after the last line of code. Exclude quotation marks
    [2] Mark your post [SOLVED] if it has been answered satisfactorily, by editing your original post using advanced mode.
    [3] Thank those that provided useful help, its nice and its very well appreciated...use the star on the lower left of the post

  3. #3
    Registered User
    Join Date
    02-04-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    8
    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 11:11 AM.

  4. #4
    Valued Forum Contributor
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    238

    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
    8

    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.2.0