+ Reply to Thread
Results 1 to 2 of 2

Lookup applicable rows and sum values

  1. #1
    Registered User
    Join Date
    04-01-2013
    Location
    KY
    MS-Off Ver
    Excel 2013
    Posts
    9

    Lookup applicable rows and sum values

    I am new to VBA in excel and need some help with how to write this code.

    I am creating a table that calculates a scrap percentage rate based on the total produced value (entered manually into the table) with the scrap total for that day (calculated by summing the total scrap weights which are divided into several categories in a seperate table). I have a table where the date, department, and machine, and produced product are entered. the next value i am trying to calculate using an AND() inside of a SUMIF(). I want the cell to display the sum of all the scrap from each individual category that was entered with a matching date, department, and machine.

    This is the formula i have tried and i continue to receive the "are you sure your making a formula?" message:

    =sumif(PDSV,AND([Date]=PDSV[Date:],[Department]=PDSV[Department],[Machine]=PDSV[Machine]),PDSV[[Shavings]:[Other])

    PDSV is the table that scrap information is stored in
    PDSV[[Shavings]:[Other]) is the column range of categories for scrap where the weights are stored.

    I need to know why this formula won't work, or if there is a better way to accomplish this.

    Please let me know if this is unclear.

    Thank you
    Last edited by T 520; 04-08-2013 at 01:10 PM.

  2. #2
    Registered User
    Join Date
    04-01-2013
    Location
    KY
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: Lookup applicable rows and sum values

    I was able to create a dummy column that sums the row totals and then use a SUMIFS() in the second table to sum values looked up based on multiple criteria.

+ 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