Hi,
I have a spreadsheet schedule that pulls quantities from another spreadsheet's cells. if the part number of the reference row matches the schedule cell's part number (row), and the date of the reference cell row is 2 workdays after that of the schedule cell's column, the quantity is put in the right place in the schedule. that part works. the problem I have is that sometimes there is more than one quantity with the same part number and date (due to the parts belonging to different jobs). when this is the case, only one of the quantities is picked up by the schedule. i want the schedule cells to sum the quantities of the reference file with matching criteria. i also don't want to have to change the reference file at all in order to do this. below is the function that works (besides summing the duplicates). the part after the " " is what i would need to alter.
HXS is the reference file where D is the part number column, I is the date column, and 5 is the index column referencing the quantity.
C is the part number column in the schedule
K is the date row in the schedule
=IF(ISNA(INDEX(HXS.xls!$D$16:$I$310,MATCH(1,IF(HXS.xls!$D$16:$D$310=$C5,IF(HXS.xls!$I$16:$I$310=WORKDAY(K$2,2),1,IF(HXS.xls!$I$16:$I$310=(K$2)+3,1)))),5))," ",(INDEX(HXS.xls!$D$16:$I$310,MATCH(1,IF(HXS.xls!$D$16:$D$310=$C5,IF(HXS.xls!$I$16:$I$310=WORKDAY(K$2,2),1,IF(HXS.xls!$I$16:$I$310=(K$2)+3,1)))),5)))
I know there's a lot of info here so let me know if it's confusing. Thanks for the help!
Bookmarks