Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Sumproduct between and

Is it possible to sumproduct((a1:a50=D30)*(b1:b50 between(01/06/07)
and(30/06/07))*c1:c50) I am trying to get a sum of a column based on dates
as well as other criteria. Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Sumproduct between and

Just keep adding them to the criteria:

=sumproduct((a1:a50=d30)
*(b1:b50=date(2007,6,1))
*(b1:b50<=date(2007,6,30)
*(c1:c50))

Or since you want a single month:

=sumproduct((a1:a50=d30)
*(text(b1:b50,"yyyymm")="200706")
*(c1:c50))


I guess it depends on what happens on the June 1 and June 30, though. You may
not want = and <= in that first formula.


Arlene wrote:

Is it possible to sumproduct((a1:a50=D30)*(b1:b50 between(01/06/07)
and(30/06/07))*c1:c50) I am trying to get a sum of a column based on dates
as well as other criteria. Thanks


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Sumproduct between and

Dave is there anyway I can reference cells for the month either in < or so
someone only has to change those two cells or one (month only) to get the
formulas to work. I have tried*(Input a5:A55<=date(a1))*(Input
a5:a55=date(a2)) and formated the cells to the same as the input sheet
values but just get an error message. Thanks

"Dave Peterson" wrote:

Just keep adding them to the criteria:

=sumproduct((a1:a50=d30)
*(b1:b50=date(2007,6,1))
*(b1:b50<=date(2007,6,30)
*(c1:c50))

Or since you want a single month:

=sumproduct((a1:a50=d30)
*(text(b1:b50,"yyyymm")="200706")
*(c1:c50))


I guess it depends on what happens on the June 1 and June 30, though. You may
not want = and <= in that first formula.


Arlene wrote:

Is it possible to sumproduct((a1:a50=D30)*(b1:b50 between(01/06/07)
and(30/06/07))*c1:c50) I am trying to get a sum of a column based on dates
as well as other criteria. Thanks


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Sumproduct between and

Put the smaller date in A1 and the larger date in A2. And make sure you enter
real dates in A1 and A2.



=sumproduct((a1:a50=d30)
*(b1:b50=a1)
*(b1:b50<=a2)
*(c1:c50))

Arlene wrote:

Dave is there anyway I can reference cells for the month either in < or so
someone only has to change those two cells or one (month only) to get the
formulas to work. I have tried*(Input a5:A55<=date(a1))*(Input
a5:a55=date(a2)) and formated the cells to the same as the input sheet
values but just get an error message. Thanks

"Dave Peterson" wrote:

Just keep adding them to the criteria:

=sumproduct((a1:a50=d30)
*(b1:b50=date(2007,6,1))
*(b1:b50<=date(2007,6,30)
*(c1:c50))

Or since you want a single month:

=sumproduct((a1:a50=d30)
*(text(b1:b50,"yyyymm")="200706")
*(c1:c50))


I guess it depends on what happens on the June 1 and June 30, though. You may
not want = and <= in that first formula.


Arlene wrote:

Is it possible to sumproduct((a1:a50=D30)*(b1:b50 between(01/06/07)
and(30/06/07))*c1:c50) I am trying to get a sum of a column based on dates
as well as other criteria. Thanks


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Sumproduct between and

=SUMPRODUCT(('YTD MACH HRS'!$I$5:$I$65536='PHASE HRS MONTHLY'!$C7)*('YTD MACH
HRS'!$G$5:$G$65536='PHASE HRS MONTHLY'!$B8)*('YTD MACH
HRS'!$B$5:$B$65536='PHASE HRS MONTHLY'!$A$2)*'YTD MACH
HRS'!$B$5:$B$65536<='PHASE HRS MONTHLY'!$A$3)*'YTD MACH HRS'!$D$5:$D$65536

For some reason it doesn't seem to want to work a2 and a3 are date formated
to exactly waht is in YTD Mach hrs b5:b65536. Can you see what I am doing
wrong? Thanks I really appreciate it.

"Dave Peterson" wrote:

Put the smaller date in A1 and the larger date in A2. And make sure you enter
real dates in A1 and A2.



=sumproduct((a1:a50=d30)
*(b1:b50=a1)
*(b1:b50<=a2)
*(c1:c50))

Arlene wrote:

Dave is there anyway I can reference cells for the month either in < or so
someone only has to change those two cells or one (month only) to get the
formulas to work. I have tried*(Input a5:A55<=date(a1))*(Input
a5:a55=date(a2)) and formated the cells to the same as the input sheet
values but just get an error message. Thanks

"Dave Peterson" wrote:

Just keep adding them to the criteria:

=sumproduct((a1:a50=d30)
*(b1:b50=date(2007,6,1))
*(b1:b50<=date(2007,6,30)
*(c1:c50))

Or since you want a single month:

=sumproduct((a1:a50=d30)
*(text(b1:b50,"yyyymm")="200706")
*(c1:c50))


I guess it depends on what happens on the June 1 and June 30, though. You may
not want = and <= in that first formula.


Arlene wrote:

Is it possible to sumproduct((a1:a50=D30)*(b1:b50 between(01/06/07)
and(30/06/07))*c1:c50) I am trying to get a sum of a column based on dates
as well as other criteria. Thanks

--

Dave Peterson


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Sumproduct between and

What are the values in those cells? Are you sure that they're dates--not just
text that look like dates?

It may help if you shink up the range (rows 5:10) and plop in some test data
once more.


Arlene wrote:

=SUMPRODUCT(('YTD MACH HRS'!$I$5:$I$65536='PHASE HRS MONTHLY'!$C7)*('YTD MACH
HRS'!$G$5:$G$65536='PHASE HRS MONTHLY'!$B8)*('YTD MACH
HRS'!$B$5:$B$65536='PHASE HRS MONTHLY'!$A$2)*'YTD MACH
HRS'!$B$5:$B$65536<='PHASE HRS MONTHLY'!$A$3)*'YTD MACH HRS'!$D$5:$D$65536

For some reason it doesn't seem to want to work a2 and a3 are date formated
to exactly waht is in YTD Mach hrs b5:b65536. Can you see what I am doing
wrong? Thanks I really appreciate it.

"Dave Peterson" wrote:

Put the smaller date in A1 and the larger date in A2. And make sure you enter
real dates in A1 and A2.



=sumproduct((a1:a50=d30)
*(b1:b50=a1)
*(b1:b50<=a2)
*(c1:c50))

Arlene wrote:

Dave is there anyway I can reference cells for the month either in < or so
someone only has to change those two cells or one (month only) to get the
formulas to work. I have tried*(Input a5:A55<=date(a1))*(Input
a5:a55=date(a2)) and formated the cells to the same as the input sheet
values but just get an error message. Thanks

"Dave Peterson" wrote:

Just keep adding them to the criteria:

=sumproduct((a1:a50=d30)
*(b1:b50=date(2007,6,1))
*(b1:b50<=date(2007,6,30)
*(c1:c50))

Or since you want a single month:

=sumproduct((a1:a50=d30)
*(text(b1:b50,"yyyymm")="200706")
*(c1:c50))


I guess it depends on what happens on the June 1 and June 30, though. You may
not want = and <= in that first formula.


Arlene wrote:

Is it possible to sumproduct((a1:a50=D30)*(b1:b50 between(01/06/07)
and(30/06/07))*c1:c50) I am trying to get a sum of a column based on dates
as well as other criteria. Thanks

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Sumproduct between and

I have taken the columns and formated them to dates dd/mm/yy on both pages,
the first page is an ODBC link. Could that be the problem? I will give a
try by manually inputing dates on the linked page.

"Dave Peterson" wrote:

What are the values in those cells? Are you sure that they're dates--not just
text that look like dates?

It may help if you shink up the range (rows 5:10) and plop in some test data
once more.


Arlene wrote:

=SUMPRODUCT(('YTD MACH HRS'!$I$5:$I$65536='PHASE HRS MONTHLY'!$C7)*('YTD MACH
HRS'!$G$5:$G$65536='PHASE HRS MONTHLY'!$B8)*('YTD MACH
HRS'!$B$5:$B$65536='PHASE HRS MONTHLY'!$A$2)*'YTD MACH
HRS'!$B$5:$B$65536<='PHASE HRS MONTHLY'!$A$3)*'YTD MACH HRS'!$D$5:$D$65536

For some reason it doesn't seem to want to work a2 and a3 are date formated
to exactly waht is in YTD Mach hrs b5:b65536. Can you see what I am doing
wrong? Thanks I really appreciate it.

"Dave Peterson" wrote:

Put the smaller date in A1 and the larger date in A2. And make sure you enter
real dates in A1 and A2.



=sumproduct((a1:a50=d30)
*(b1:b50=a1)
*(b1:b50<=a2)
*(c1:c50))

Arlene wrote:

Dave is there anyway I can reference cells for the month either in < or so
someone only has to change those two cells or one (month only) to get the
formulas to work. I have tried*(Input a5:A55<=date(a1))*(Input
a5:a55=date(a2)) and formated the cells to the same as the input sheet
values but just get an error message. Thanks

"Dave Peterson" wrote:

Just keep adding them to the criteria:

=sumproduct((a1:a50=d30)
*(b1:b50=date(2007,6,1))
*(b1:b50<=date(2007,6,30)
*(c1:c50))

Or since you want a single month:

=sumproduct((a1:a50=d30)
*(text(b1:b50,"yyyymm")="200706")
*(c1:c50))


I guess it depends on what happens on the June 1 and June 30, though. You may
not want = and <= in that first formula.


Arlene wrote:

Is it possible to sumproduct((a1:a50=D30)*(b1:b50 between(01/06/07)
and(30/06/07))*c1:c50) I am trying to get a sum of a column based on dates
as well as other criteria. Thanks

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Sumproduct between and

I manually entered the date and checked the formating and still could not get
a result, just blanks. Is there another way to format the column? Or what
else could I look at? Thanks

"Dave Peterson" wrote:

What are the values in those cells? Are you sure that they're dates--not just
text that look like dates?

It may help if you shink up the range (rows 5:10) and plop in some test data
once more.


Arlene wrote:

=SUMPRODUCT(('YTD MACH HRS'!$I$5:$I$65536='PHASE HRS MONTHLY'!$C7)*('YTD MACH
HRS'!$G$5:$G$65536='PHASE HRS MONTHLY'!$B8)*('YTD MACH
HRS'!$B$5:$B$65536='PHASE HRS MONTHLY'!$A$2)*'YTD MACH
HRS'!$B$5:$B$65536<='PHASE HRS MONTHLY'!$A$3)*'YTD MACH HRS'!$D$5:$D$65536

For some reason it doesn't seem to want to work a2 and a3 are date formated
to exactly waht is in YTD Mach hrs b5:b65536. Can you see what I am doing
wrong? Thanks I really appreciate it.

"Dave Peterson" wrote:

Put the smaller date in A1 and the larger date in A2. And make sure you enter
real dates in A1 and A2.



=sumproduct((a1:a50=d30)
*(b1:b50=a1)
*(b1:b50<=a2)
*(c1:c50))

Arlene wrote:

Dave is there anyway I can reference cells for the month either in < or so
someone only has to change those two cells or one (month only) to get the
formulas to work. I have tried*(Input a5:A55<=date(a1))*(Input
a5:a55=date(a2)) and formated the cells to the same as the input sheet
values but just get an error message. Thanks

"Dave Peterson" wrote:

Just keep adding them to the criteria:

=sumproduct((a1:a50=d30)
*(b1:b50=date(2007,6,1))
*(b1:b50<=date(2007,6,30)
*(c1:c50))

Or since you want a single month:

=sumproduct((a1:a50=d30)
*(text(b1:b50,"yyyymm")="200706")
*(c1:c50))


I guess it depends on what happens on the June 1 and June 30, though. You may
not want = and <= in that first formula.


Arlene wrote:

Is it possible to sumproduct((a1:a50=D30)*(b1:b50 between(01/06/07)
and(30/06/07))*c1:c50) I am trying to get a sum of a column based on dates
as well as other criteria. Thanks

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Sumproduct between and

The formula doesn't look at the way the values are formatted. It looks at the
value in the cells.

Maybe some of your dates are really in dmy order instead of mdy. Or maybe those
dates are really text (that look like dates).

I'd format the date cells in an unambiguous format (just temporarily):
mmmm dd, yyyy

And see if you have any cells that don't change what they display.


Arlene wrote:

I have taken the columns and formated them to dates dd/mm/yy on both pages,
the first page is an ODBC link. Could that be the problem? I will give a
try by manually inputing dates on the linked page.

"Dave Peterson" wrote:

What are the values in those cells? Are you sure that they're dates--not just
text that look like dates?

It may help if you shink up the range (rows 5:10) and plop in some test data
once more.


Arlene wrote:

=SUMPRODUCT(('YTD MACH HRS'!$I$5:$I$65536='PHASE HRS MONTHLY'!$C7)*('YTD MACH
HRS'!$G$5:$G$65536='PHASE HRS MONTHLY'!$B8)*('YTD MACH
HRS'!$B$5:$B$65536='PHASE HRS MONTHLY'!$A$2)*'YTD MACH
HRS'!$B$5:$B$65536<='PHASE HRS MONTHLY'!$A$3)*'YTD MACH HRS'!$D$5:$D$65536

For some reason it doesn't seem to want to work a2 and a3 are date formated
to exactly waht is in YTD Mach hrs b5:b65536. Can you see what I am doing
wrong? Thanks I really appreciate it.

"Dave Peterson" wrote:

Put the smaller date in A1 and the larger date in A2. And make sure you enter
real dates in A1 and A2.



=sumproduct((a1:a50=d30)
*(b1:b50=a1)
*(b1:b50<=a2)
*(c1:c50))

Arlene wrote:

Dave is there anyway I can reference cells for the month either in < or so
someone only has to change those two cells or one (month only) to get the
formulas to work. I have tried*(Input a5:A55<=date(a1))*(Input
a5:a55=date(a2)) and formated the cells to the same as the input sheet
values but just get an error message. Thanks

"Dave Peterson" wrote:

Just keep adding them to the criteria:

=sumproduct((a1:a50=d30)
*(b1:b50=date(2007,6,1))
*(b1:b50<=date(2007,6,30)
*(c1:c50))

Or since you want a single month:

=sumproduct((a1:a50=d30)
*(text(b1:b50,"yyyymm")="200706")
*(c1:c50))


I guess it depends on what happens on the June 1 and June 30, though. You may
not want = and <= in that first formula.


Arlene wrote:

Is it possible to sumproduct((a1:a50=D30)*(b1:b50 between(01/06/07)
and(30/06/07))*c1:c50) I am trying to get a sum of a column based on dates
as well as other criteria. Thanks

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Sumproduct between and

Thanks Dave for your patience. I have it working, for some reason I just
needed to refresh my ODBC and it started to work well.

"Dave Peterson" wrote:

The formula doesn't look at the way the values are formatted. It looks at the
value in the cells.

Maybe some of your dates are really in dmy order instead of mdy. Or maybe those
dates are really text (that look like dates).

I'd format the date cells in an unambiguous format (just temporarily):
mmmm dd, yyyy

And see if you have any cells that don't change what they display.


Arlene wrote:

I have taken the columns and formated them to dates dd/mm/yy on both pages,
the first page is an ODBC link. Could that be the problem? I will give a
try by manually inputing dates on the linked page.

"Dave Peterson" wrote:

What are the values in those cells? Are you sure that they're dates--not just
text that look like dates?

It may help if you shink up the range (rows 5:10) and plop in some test data
once more.


Arlene wrote:

=SUMPRODUCT(('YTD MACH HRS'!$I$5:$I$65536='PHASE HRS MONTHLY'!$C7)*('YTD MACH
HRS'!$G$5:$G$65536='PHASE HRS MONTHLY'!$B8)*('YTD MACH
HRS'!$B$5:$B$65536='PHASE HRS MONTHLY'!$A$2)*'YTD MACH
HRS'!$B$5:$B$65536<='PHASE HRS MONTHLY'!$A$3)*'YTD MACH HRS'!$D$5:$D$65536

For some reason it doesn't seem to want to work a2 and a3 are date formated
to exactly waht is in YTD Mach hrs b5:b65536. Can you see what I am doing
wrong? Thanks I really appreciate it.

"Dave Peterson" wrote:

Put the smaller date in A1 and the larger date in A2. And make sure you enter
real dates in A1 and A2.



=sumproduct((a1:a50=d30)
*(b1:b50=a1)
*(b1:b50<=a2)
*(c1:c50))

Arlene wrote:

Dave is there anyway I can reference cells for the month either in < or so
someone only has to change those two cells or one (month only) to get the
formulas to work. I have tried*(Input a5:A55<=date(a1))*(Input
a5:a55=date(a2)) and formated the cells to the same as the input sheet
values but just get an error message. Thanks

"Dave Peterson" wrote:

Just keep adding them to the criteria:

=sumproduct((a1:a50=d30)
*(b1:b50=date(2007,6,1))
*(b1:b50<=date(2007,6,30)
*(c1:c50))

Or since you want a single month:

=sumproduct((a1:a50=d30)
*(text(b1:b50,"yyyymm")="200706")
*(c1:c50))


I guess it depends on what happens on the June 1 and June 30, though. You may
not want = and <= in that first formula.


Arlene wrote:

Is it possible to sumproduct((a1:a50=D30)*(b1:b50 between(01/06/07)
and(30/06/07))*c1:c50) I am trying to get a sum of a column based on dates
as well as other criteria. Thanks

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


--

Dave Peterson



  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Sumproduct between and

That explains it--you never want to have a stale ODBC!

<gd&r

Arlene wrote:

Thanks Dave for your patience. I have it working, for some reason I just
needed to refresh my ODBC and it started to work well.

"Dave Peterson" wrote:

The formula doesn't look at the way the values are formatted. It looks at the
value in the cells.

Maybe some of your dates are really in dmy order instead of mdy. Or maybe those
dates are really text (that look like dates).

I'd format the date cells in an unambiguous format (just temporarily):
mmmm dd, yyyy

And see if you have any cells that don't change what they display.


Arlene wrote:

I have taken the columns and formated them to dates dd/mm/yy on both pages,
the first page is an ODBC link. Could that be the problem? I will give a
try by manually inputing dates on the linked page.

"Dave Peterson" wrote:

What are the values in those cells? Are you sure that they're dates--not just
text that look like dates?

It may help if you shink up the range (rows 5:10) and plop in some test data
once more.


Arlene wrote:

=SUMPRODUCT(('YTD MACH HRS'!$I$5:$I$65536='PHASE HRS MONTHLY'!$C7)*('YTD MACH
HRS'!$G$5:$G$65536='PHASE HRS MONTHLY'!$B8)*('YTD MACH
HRS'!$B$5:$B$65536='PHASE HRS MONTHLY'!$A$2)*'YTD MACH
HRS'!$B$5:$B$65536<='PHASE HRS MONTHLY'!$A$3)*'YTD MACH HRS'!$D$5:$D$65536

For some reason it doesn't seem to want to work a2 and a3 are date formated
to exactly waht is in YTD Mach hrs b5:b65536. Can you see what I am doing
wrong? Thanks I really appreciate it.

"Dave Peterson" wrote:

Put the smaller date in A1 and the larger date in A2. And make sure you enter
real dates in A1 and A2.



=sumproduct((a1:a50=d30)
*(b1:b50=a1)
*(b1:b50<=a2)
*(c1:c50))

Arlene wrote:

Dave is there anyway I can reference cells for the month either in < or so
someone only has to change those two cells or one (month only) to get the
formulas to work. I have tried*(Input a5:A55<=date(a1))*(Input
a5:a55=date(a2)) and formated the cells to the same as the input sheet
values but just get an error message. Thanks

"Dave Peterson" wrote:

Just keep adding them to the criteria:

=sumproduct((a1:a50=d30)
*(b1:b50=date(2007,6,1))
*(b1:b50<=date(2007,6,30)
*(c1:c50))

Or since you want a single month:

=sumproduct((a1:a50=d30)
*(text(b1:b50,"yyyymm")="200706")
*(c1:c50))


I guess it depends on what happens on the June 1 and June 30, though. You may
not want = and <= in that first formula.


Arlene wrote:

Is it possible to sumproduct((a1:a50=D30)*(b1:b50 between(01/06/07)
and(30/06/07))*c1:c50) I am trying to get a sum of a column based on dates
as well as other criteria. Thanks

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
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 with Condition OR Sumproduct with ADDRESS function - HE gholly Excel Discussion (Misc queries) 2 September 28th 09 05:07 PM
sumproduct help kristap Excel Worksheet Functions 12 June 17th 09 06:28 AM
Conditional SUMPRODUCT or SUMPRODUCT with Filters Ted M H Excel Worksheet Functions 4 August 14th 08 07:50 PM
sumproduct? sumif(sumproduct)? David Excel Worksheet Functions 3 July 13th 07 07:06 PM
sumproduct help JR Excel Worksheet Functions 2 February 21st 06 08:39 PM


All times are GMT +1. The time now is 10:03 PM.

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"