SUMPRODUCT help - basic

krispatterson

Board Regular
Joined
Apr 28, 2017
Messages
51
Hi guys

Struggling with what I think should be fairly easy to resolve... Advices please!

Data:

ABCDEF
1DATESNAMES£ FIGURES01/11/16
2

<tbody>
</tbody>

The formula I want in F1:

> looks for all dates in Column A from E1 + 12m (so, 01/11/16 to 01/11/17)
> looks for a specific name in Column B (ie, John)
> adds up the figures based on that criteria.


What I tried was:
=SUMPRODUCT(--(YEAR($A$3:$A$20000)=YEAR($E$1)*($B$3:$B$20000="*john*")*$C$3:$C$20000))


But that's returning a '0' result in all circumstances - I've obviously got it wrong!

Any advice welcomed please :)

Thanks
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
2 probems.

1. Misplaced )
=SUMPRODUCT(--(YEAR($A$3:$A$20000)=YEAR($E$1)*($B$3:$B$20000="*john*")*$C$3:$C$20000))
shoul be
=SUMPRODUCT(--(YEAR($A$3:$A$20000)=YEAR($E$1))*($B$3:$B$20000="*john*")*$C$3:$C$20000)

2. Wildcards don't work in sumproduct ($B$3:$B$20000="*john*")
That will literally look for the asterisks in the string of column B.
You'd have to do
(ISNUMBER(SEARCH("john",$B$3:$B$20000)))
 
Last edited:
Upvote 0
Thanks both - but no longer need this as I've been made redundant from the job I needed it for!! :(

Never mind, onwards and upwards :eek:
 
Upvote 0

Forum statistics

Threads
1,216,743
Messages
6,132,457
Members
449,729
Latest member
davelevnt

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top