# Sumif embedded in a sumproduct w/ today's date minus a column of dates is greater than 365

1. ## Sumif embedded in a sumproduct w/ today's date minus a column of dates is greater than 365

I am trying to build a formula that sums a column of shares owned based on the date in which the shares were purchased. I need the formula to subtract the date the shares were purchased from today's date and if that is greater or equal to 365, add the corresponding number of shares purchased. My current formula is... =SUMPRODUCT(SUMIF(B3:B32,TODAY()-B3:B34&">="&365,H3:H32))... however it is reading zero even though there are 18 dates that qualify. Thanks in advance for the help!

2. ## Re: Sumif embedded in a sumproduct w/ today's date minus a column of dates is greater than

Hi,
Fast answers need clear examples. Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands...) and some manually calculated results. Just before posting, scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen.

3. ## Re: Sumif embedded in a sumproduct w/ today's date minus a column of dates is greater than

Hi. I uploaded an attachment. Thanks!

4. ## Re: Sumif embedded in a sumproduct w/ today's date minus a column of dates is greater than

=sumproduct((today()-b3:b7>=365)*(\$c\$3:\$c\$7))

5. ## Re: Sumif embedded in a sumproduct w/ today's date minus a column of dates is greater than

E3=sumifs(c3:c7,b3:b7,"<="&edate(today(),-12))

6. ## Re: Sumif embedded in a sumproduct w/ today's date minus a column of dates is greater than

It worked! Thanks for the help.

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