Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 586
Default SumIf Function Question

I have a very large Worksheet labeled 'Global Schedule'. The first 2 rows
are used as a header. In Col. J there are dates and in Col. N there are
prices. At any given time Col. J cells may or may not have a date. I would
like
the formula placed in a worksheet labeled 'Summary'. Here is what I have,
but it does not seem to work.

1.) Sum all cells in Col. N if the cell in the same row in Col. J is a date
within the current month.
=SUMIF(Month('Global Schedule'!J:J),"="&MONTH(NOW()),'Global Schedule'!N:N)

2.) Sum all cells in Col. N if the cell in the same row in Col. J is a date
within the next month.
=SUMIF(Month('Global Schedule'!J:J),"="&MONTH(NOW())+1,'Global Schedule'!N:N)

3.) Sum all cells in Col. N if the cell in the same row in Col. J is a date
after the next month.
=SUMIF(Month('Global Schedule'!J:J),""&MONTH(NOW())+1,'Global Schedule'!N:N)

Thanks,
Ryan


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 510
Default SumIf Function Question

Hi


=SUMPRODUCT(--('Global
Schedule'!$J$3:$J$10000DATE(YEAR(TODAY(),MONTH(TO DAY(),0),--('Global
Schedule'!$J3:$J$10000<DATE(YEAR(TODAY(),MONTH(TOD AY()+1,1),'Global
Schedule'!$N$2:$N$10000)

=SUMPRODUCT(--('Global
Schedule'!$J$3:$J$10000DATE(YEAR(TODAY(),MONTH(TO DAY()+1,0),--('Global
Schedule'!$J3:$J$10000<DATE(YEAR(TODAY(),MONTH(TOD AY()+2,1),'Global
Schedule'!$N$2:$N$10000)

=SUMPRODUCT(--('Global
Schedule'!$J$3:$J$10000DATE(YEAR(TODAY(),MONTH(TO DAY()+2,0),'Global
Schedule'!$N$2:$N$10000)

Adjust ranges.
NB! SUMPRODUCT doesn't allow references to whole column. Refer to range with
enough spare rows, or use dynamic named ranges instead!
NB! All ranges used in sumproduct as source ranges MUST be of same dimension
(include same number of rows)!

--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )



"RyanH" wrote in message
...
I have a very large Worksheet labeled 'Global Schedule'. The first 2 rows
are used as a header. In Col. J there are dates and in Col. N there are
prices. At any given time Col. J cells may or may not have a date. I
would
like
the formula placed in a worksheet labeled 'Summary'. Here is what I have,
but it does not seem to work.

1.) Sum all cells in Col. N if the cell in the same row in Col. J is a
date
within the current month.
=SUMIF(Month('Global Schedule'!J:J),"="&MONTH(NOW()),'Global
Schedule'!N:N)

2.) Sum all cells in Col. N if the cell in the same row in Col. J is a
date
within the next month.
=SUMIF(Month('Global Schedule'!J:J),"="&MONTH(NOW())+1,'Global
Schedule'!N:N)

3.) Sum all cells in Col. N if the cell in the same row in Col. J is a
date
after the next month.
=SUMIF(Month('Global Schedule'!J:J),""&MONTH(NOW())+1,'Global
Schedule'!N:N)

Thanks,
Ryan




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default SumIf Function Question

Try it with SUMPRODUCT - the main caveat is that you cannot use full column
references (unless you have Excel 2007). Here's an example of the first one:

=SUMPRODUCT(--(MONTH('Global Schedule'!J1:J1000)=MONTH(NOW())),'Global
Schedule'!N1:N1000)

I've limited this to 1000 rows - adjust if you have more.

Hope this helps.

Pete

"RyanH" wrote in message
...
I have a very large Worksheet labeled 'Global Schedule'. The first 2 rows
are used as a header. In Col. J there are dates and in Col. N there are
prices. At any given time Col. J cells may or may not have a date. I
would
like
the formula placed in a worksheet labeled 'Summary'. Here is what I have,
but it does not seem to work.

1.) Sum all cells in Col. N if the cell in the same row in Col. J is a
date
within the current month.
=SUMIF(Month('Global Schedule'!J:J),"="&MONTH(NOW()),'Global
Schedule'!N:N)

2.) Sum all cells in Col. N if the cell in the same row in Col. J is a
date
within the next month.
=SUMIF(Month('Global Schedule'!J:J),"="&MONTH(NOW())+1,'Global
Schedule'!N:N)

3.) Sum all cells in Col. N if the cell in the same row in Col. J is a
date
after the next month.
=SUMIF(Month('Global Schedule'!J:J),""&MONTH(NOW())+1,'Global
Schedule'!N:N)

Thanks,
Ryan




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 586
Default SumIf Function Question

What does the "--" portion of the formula for? (Located after "=SUMPRODUCT("
and before "(MONTH(....")


"Pete_UK" wrote:

Try it with SUMPRODUCT - the main caveat is that you cannot use full column
references (unless you have Excel 2007). Here's an example of the first one:

=SUMPRODUCT(--(MONTH('Global Schedule'!J1:J1000)=MONTH(NOW())),'Global
Schedule'!N1:N1000)

I've limited this to 1000 rows - adjust if you have more.

Hope this helps.

Pete

"RyanH" wrote in message
...
I have a very large Worksheet labeled 'Global Schedule'. The first 2 rows
are used as a header. In Col. J there are dates and in Col. N there are
prices. At any given time Col. J cells may or may not have a date. I
would
like
the formula placed in a worksheet labeled 'Summary'. Here is what I have,
but it does not seem to work.

1.) Sum all cells in Col. N if the cell in the same row in Col. J is a
date
within the current month.
=SUMIF(Month('Global Schedule'!J:J),"="&MONTH(NOW()),'Global
Schedule'!N:N)

2.) Sum all cells in Col. N if the cell in the same row in Col. J is a
date
within the next month.
=SUMIF(Month('Global Schedule'!J:J),"="&MONTH(NOW())+1,'Global
Schedule'!N:N)

3.) Sum all cells in Col. N if the cell in the same row in Col. J is a
date
after the next month.
=SUMIF(Month('Global Schedule'!J:J),""&MONTH(NOW())+1,'Global
Schedule'!N:N)

Thanks,
Ryan





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 510
Default SumIf Function Question

Hi


"RyanH" wrote in message
...
What does the "--" portion of the formula for? (Located after
"=SUMPRODUCT("
and before "(MONTH(....")


Converts logical ecpression to its numeric value. When you are multiplying
directly in formula like
=SUMPRODUCT((Range1=Value)*(Range2=Value2)*Range3)
, then Excel does the converting for you. When you try
=SUMPRODUCT((Range1=Value),(Range2=Value2).Range3)
instead, Excel tries to multiply logical TRU/FALSE with a number, and this
does'nt work. Better will be
=SUMPRODUCT((Range1=Value)*1,(Range2=Value2)*1.Ran ge3)
, where multiplying with 1 converts all parts of formula to numbers, and
=SUMPRODUCT(--(Range1=Value),--(Range2=Value2).Range3)
does exactly same, but is considered as preferable beacuse it's faster
compared to other syntaxes.


--
Arvi Laanemets
( My real mail address: arvi.laanemets<attarkon.ee )




"Pete_UK" wrote:

Try it with SUMPRODUCT - the main caveat is that you cannot use full
column
references (unless you have Excel 2007). Here's an example of the first
one:

=SUMPRODUCT(--(MONTH('Global Schedule'!J1:J1000)=MONTH(NOW())),'Global
Schedule'!N1:N1000)

I've limited this to 1000 rows - adjust if you have more.

Hope this helps.

Pete

"RyanH" wrote in message
...
I have a very large Worksheet labeled 'Global Schedule'. The first 2
rows
are used as a header. In Col. J there are dates and in Col. N there
are
prices. At any given time Col. J cells may or may not have a date. I
would
like
the formula placed in a worksheet labeled 'Summary'. Here is what I
have,
but it does not seem to work.

1.) Sum all cells in Col. N if the cell in the same row in Col. J is a
date
within the current month.
=SUMIF(Month('Global Schedule'!J:J),"="&MONTH(NOW()),'Global
Schedule'!N:N)

2.) Sum all cells in Col. N if the cell in the same row in Col. J is a
date
within the next month.
=SUMIF(Month('Global Schedule'!J:J),"="&MONTH(NOW())+1,'Global
Schedule'!N:N)

3.) Sum all cells in Col. N if the cell in the same row in Col. J is a
date
after the next month.
=SUMIF(Month('Global Schedule'!J:J),""&MONTH(NOW())+1,'Global
Schedule'!N:N)

Thanks,
Ryan









  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default SumIf Function Question

Try a Google for the phrase "double unary minus".
--
David Biddulph

"RyanH" wrote in message
...
What does the "--" portion of the formula for? (Located after
"=SUMPRODUCT("
and before "(MONTH(....")


"Pete_UK" wrote:

Try it with SUMPRODUCT - the main caveat is that you cannot use full
column
references (unless you have Excel 2007). Here's an example of the first
one:

=SUMPRODUCT(--(MONTH('Global Schedule'!J1:J1000)=MONTH(NOW())),'Global
Schedule'!N1:N1000)

I've limited this to 1000 rows - adjust if you have more.

Hope this helps.

Pete

"RyanH" wrote in message
...
I have a very large Worksheet labeled 'Global Schedule'. The first 2
rows
are used as a header. In Col. J there are dates and in Col. N there
are
prices. At any given time Col. J cells may or may not have a date. I
would
like
the formula placed in a worksheet labeled 'Summary'. Here is what I
have,
but it does not seem to work.

1.) Sum all cells in Col. N if the cell in the same row in Col. J is a
date
within the current month.
=SUMIF(Month('Global Schedule'!J:J),"="&MONTH(NOW()),'Global
Schedule'!N:N)

2.) Sum all cells in Col. N if the cell in the same row in Col. J is a
date
within the next month.
=SUMIF(Month('Global Schedule'!J:J),"="&MONTH(NOW())+1,'Global
Schedule'!N:N)

3.) Sum all cells in Col. N if the cell in the same row in Col. J is a
date
after the next month.
=SUMIF(Month('Global Schedule'!J:J),""&MONTH(NOW())+1,'Global
Schedule'!N:N)

Thanks,
Ryan







  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default SumIf Function Question

=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

RyanH wrote:

What does the "--" portion of the formula for? (Located after "=SUMPRODUCT("
and before "(MONTH(....")

"Pete_UK" wrote:

Try it with SUMPRODUCT - the main caveat is that you cannot use full column
references (unless you have Excel 2007). Here's an example of the first one:

=SUMPRODUCT(--(MONTH('Global Schedule'!J1:J1000)=MONTH(NOW())),'Global
Schedule'!N1:N1000)

I've limited this to 1000 rows - adjust if you have more.

Hope this helps.

Pete

"RyanH" wrote in message
...
I have a very large Worksheet labeled 'Global Schedule'. The first 2 rows
are used as a header. In Col. J there are dates and in Col. N there are
prices. At any given time Col. J cells may or may not have a date. I
would
like
the formula placed in a worksheet labeled 'Summary'. Here is what I have,
but it does not seem to work.

1.) Sum all cells in Col. N if the cell in the same row in Col. J is a
date
within the current month.
=SUMIF(Month('Global Schedule'!J:J),"="&MONTH(NOW()),'Global
Schedule'!N:N)

2.) Sum all cells in Col. N if the cell in the same row in Col. J is a
date
within the next month.
=SUMIF(Month('Global Schedule'!J:J),"="&MONTH(NOW())+1,'Global
Schedule'!N:N)

3.) Sum all cells in Col. N if the cell in the same row in Col. J is a
date
after the next month.
=SUMIF(Month('Global Schedule'!J:J),""&MONTH(NOW())+1,'Global
Schedule'!N:N)

Thanks,
Ryan






--

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
function question (sumif countif conditional) Norbert Excel Worksheet Functions 0 February 25th 08 09:37 PM
SUMIF question alice Excel Discussion (Misc queries) 2 November 24th 05 02:55 PM
SUMIF function question khux Excel Worksheet Functions 1 November 8th 05 10:07 PM
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function Oscar Excel Worksheet Functions 2 January 11th 05 11:01 PM
Countif/Sumif function question psyd Excel Worksheet Functions 0 November 5th 04 06:09 AM


All times are GMT +1. The time now is 04:40 PM.

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

About Us

"It's about Microsoft Excel"