+ Reply to Thread
Results 1 to 12 of 12

how to total based upon criteria

  1. #1
    Forum Contributor
    Join Date
    02-03-2007
    Location
    Burleson, TX, USA
    MS-Off Ver
    2010
    Posts
    132

    how to total based upon criteria

    Hello all,

    I have created a workbook to calculate material usage of wood. I am trying to streamline the data entry and automate a segment and am having difficulty. I am using excel 2007 but need to be compatible with 2003. Row two in every other column has a species of wood from list (oak, ash, cherry etc...) The 10th row below this one is a board footage tally for this item. What I need the formula to do is look at the cell with the species and tally all like species together.

    Example:B2=Hickory and C11 is 30
    D2=Hickory and e11 is 80
    F2= Oak and g11 is 212
    H2=Hickory and i11 is 64

    What function can I use to tally all like species together to subtotal each different species quantity?

    Thanks for any help!!

    Mark

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    Something like this,

    =SUMPRODUCT(--(B2:H2="Hickory")*--C11:I11) subtitute the different species

    =SUMPRODUCT(--(B2:H2="Oak")*--C11:I11)
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You can use a pivot table...

    or you can list your species and then use a Sumif() formula...

    e.g. =Sumif($B$2:$H$2,"Hickory",$B$11:$H$11)

    you could replace "Hickory" with the cell reference in the header that contains the word, so that you may copy the formula across the summary sheet.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Contributor
    Join Date
    02-03-2007
    Location
    Burleson, TX, USA
    MS-Off Ver
    2010
    Posts
    132
    Thanks guys those do work, but my post wasn't clear. I do need the totals to sum as your formulas work, but I also need the species from row two to be copied down. My example only shows two species, but the sheet will allow many different in an order and the list (named range from "data" sheet) could literally be hundreds of different species. Is there a way to use one of the lookup formulas? Thanks for any help!!

    In other words, I need a cell (in this case K13) to return the specie name and the adjacent cell (L13) to return the qty for specie A and k14 and L14 to return the qty and so on...

    Thanks again.

    Mark
    Last edited by mkmed; 07-16-2008 at 10:43 AM.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

  6. #6
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    Something like this using Data Validation?

    http://www.contextures.com/xlDataVal01.html
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    02-03-2007
    Location
    Burleson, TX, USA
    MS-Off Ver
    2010
    Posts
    132
    You guys are AWESOME!! This works great, but is there a way to automate the process? My wood species uses data validation in row two (user input) and row 11 calculates qty. I would like my data in row 13, 14, 15 and 16 to be automated if possible and "look at row 2" and see which columns have duplicate entries and tally all that duplicate together. Is this possible?

    Thanks again,

    Mark

  8. #8
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi Mark,

    The best thing is is to post a sample of your sheet with the result you want.

    I'm away for a few days now, but back after the week-end. If no one picks it up I'll take a look on my return.

  9. #9
    Forum Contributor
    Join Date
    02-03-2007
    Location
    Burleson, TX, USA
    MS-Off Ver
    2010
    Posts
    132
    Please see the attached file. I want the options in K13, K14 and K15 to fill in automatically depending upon the specie in row 2.

    Thanks for any help

    Mark
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    02-03-2007
    Location
    Burleson, TX, USA
    MS-Off Ver
    2010
    Posts
    132
    Did you see my sample file Oldchippy? Thanks in advance for any additional help.

    Mark

  11. #11
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    Is this OK, gathered the selection over on the right, then made a unique list and referenced those to make it automatic.

  12. #12
    Forum Contributor
    Join Date
    02-03-2007
    Location
    Burleson, TX, USA
    MS-Off Ver
    2010
    Posts
    132
    Oldchippy -- VERY COOL!!! And a big thanks for your help!!

    Thanks again,
    Mark

+ 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