#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 122
Default Sumproduct Question

I have a database in Excel. Column A is Date in mm/dd/yyyy format.
Column G is Sales. I need a Sumproduct formula to return the sales
for Mondays in August 2009. How do I extract Mondays from mm/dd/yyyy
and build the formula? I do have multiple years in the dBase, so it
needs to consider the year too.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Sumproduct Question

One way:

=SUMPRODUCT(--(Weekday(Sheet2!A2:A11,2)=1),
--(text(Sheet2!A2:A11,"yyyymm")="200908"),
(Sheet2!G2:G11))


Adjust the ranges to match--but you can't use whole columns (except in xl2007+).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

wx4usa wrote:

I have a database in Excel. Column A is Date in mm/dd/yyyy format.
Column G is Sales. I need a Sumproduct formula to return the sales
for Mondays in August 2009. How do I extract Mondays from mm/dd/yyyy
and build the formula? I do have multiple years in the dBase, so it
needs to consider the year too.

Thanks


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Sumproduct Question

Try this...

=SUMPRODUCT(--(TEXT(A1:A500,"dddmmmyyyy")="MonAug2009"),G1:G500)

--
Biff
Microsoft Excel MVP


"wx4usa" wrote in message
...
I have a database in Excel. Column A is Date in mm/dd/yyyy format.
Column G is Sales. I need a Sumproduct formula to return the sales
for Mondays in August 2009. How do I extract Mondays from mm/dd/yyyy
and build the formula? I do have multiple years in the dBase, so it
needs to consider the year too.

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 561
Default Sumproduct Question

Consider using the function: WEEKDAY, YEAR, MONTH.
Micky


"wx4usa" wrote:

I have a database in Excel. Column A is Date in mm/dd/yyyy format.
Column G is Sales. I need a Sumproduct formula to return the sales
for Mondays in August 2009. How do I extract Mondays from mm/dd/yyyy
and build the formula? I do have multiple years in the dBase, so it
needs to consider the year too.

Thanks
.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Sumproduct Question

Consider using the function: WEEKDAY, YEAR, MONTH.

I considered it but decided not to use those. Using the TEXT function
reduces the number of array tests that are needed so it's more efficient.

However, in some international locations the TEXT function returns "weird"
results for some date formats. So, if that method fails due to the location
of use then I would use some combination of WEEKDAY, YEAR, MONTH and/or
DATE.

--
Biff
Microsoft Excel MVP


"????? (????) ?????" <micky-a*at*tapuz.co.il wrote in message
...
Consider using the function: WEEKDAY, YEAR, MONTH.
Micky


"wx4usa" wrote:

I have a database in Excel. Column A is Date in mm/dd/yyyy format.
Column G is Sales. I need a Sumproduct formula to return the sales
for Mondays in August 2009. How do I extract Mondays from mm/dd/yyyy
and build the formula? I do have multiple years in the dBase, so it
needs to consider the year too.

Thanks
.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SumProduct Question Gina[_2_] Excel Discussion (Misc queries) 4 August 25th 08 09:42 PM
SUMPRODUCT QUESTION RGB Excel Discussion (Misc queries) 3 June 15th 06 05:11 PM
SUMPRODUCT Question.... Jeremy Ellison Excel Worksheet Functions 5 December 9th 05 12:56 AM
Question about sumproduct Jason Excel Discussion (Misc queries) 1 April 21st 05 05:44 PM
Question about sumproduct bj Excel Discussion (Misc queries) 0 April 21st 05 05:40 PM


All times are GMT +1. The time now is 03:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright 2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"