# Sum first instance of duplicates within a date range

1. ## Sum first instance of duplicates within a date range

I hope anyone can help with this.

As per attached, I want to get the sum of first instance of duplicates in a range on the specified date (plan date)
Ex: on 6/1 each first instance of Part Code and Order equals to 60 qty

Please note that I am inexperienced with VBA but I welcome any solution for my problem.

Thank you.

2. ## Re: Sum first instance of duplicates within a date range

attached solution without vba just a helper column

3. ## Re: Sum first instance of duplicates within a date range

b5=SUMPRODUCT((DayPlan=B3)*(MATCH(Codeplan&\$B\$11:\$B\$57,Codeplan&\$B\$11:\$B\$57,0)=ROW(Codeplan)-ROW(C11)+1)*(Qtyplan))
``Please Login or Register  to view this content.``
Try this and copy towards right

4. ## Re: Sum first instance of duplicates within a date range

Originally Posted by humdingaling
attached solution without vba just a helper column
Thank you not only helping out with the formula but also for making it very easy to understand!
I was focusing too much on my table that I forgot about having a helper column!

5. ## Re: Sum first instance of duplicates within a date range

Originally Posted by nflsales
b5=SUMPRODUCT((DayPlan=B3)*(MATCH(Codeplan&\$B\$11:\$B\$57,Codeplan&\$B\$11:\$B\$57,0)=ROW(Codeplan)-ROW(C11)+1)*(Qtyplan))
``Please Login or Register  to view this content.``
Try this and copy towards right
Thank you! I will be studying up on your formula to be able to do these kinds of formulas on my own next time.

There are currently 1 users browsing this thread. (0 members and 1 guests)