=SUMPRODUCT(--(C:C="Jack")--(A:A>=DATE(2005,10,1)),--(A:A<=DATE(2005,12,31)))
How can I modify this to look for Jack, or Hurley, or John, or Sawyer?
Thanks a lot!
Bryce
=SUMPRODUCT(--(C:C="Jack")--(A:A>=DATE(2005,10,1)),--(A:A<=DATE(2005,12,31)))
How can I modify this to look for Jack, or Hurley, or John, or Sawyer?
Thanks a lot!
Bryce
Last edited by bkatzman; 04-01-2010 at 10:16 AM.
Instead of "John" write some cell reference so you can change value of cell. For example D1:
=SUMPRODUCT(--(C:C=D1),--(A:A>=DATE(2005,10,1)),--(A:A<=DATE(2005,12,31)))
Never use Merged Cells in Excel
I'm not sure this would work for us. I want to use this function as part of a template that I can dump a lot of data (about 1k rows) that have differing dates in A,C
Uplaod example workbook. Maybe a Pivot table is what you need.
OR's are generally conducted via Addition in Arrays/Sumproducts, ie:Originally Posted by bkatzman
=SUMPRODUCT((C:C="Jack")+(C:C="Sawyer")+(C:C="Hurley"),--(A:A>=DATE(2005,10,1)),--(A:A<=DATE(2005,12,31)))
However, for multiple search terms it's often easiest to use an ISNUMBER based test:
=SUMPRODUCT(--ISNUMBER(SEARCH(C:C,{"Jack","Sawyer","Hurley"})),--(A:A>=DATE(2005,10,1)),--(A:A<=DATE(2005,12,31)))
Try to avoid using entire column references though... (pre XL2007 you can't)
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks