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
Bookmarks