Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 140
Default SumProduct with dates

I have column A on sheet 1 with dates from 1/1/2008 to present and column B
with values. On sheet 2 i have across row 1 all the months(with years) ie,
Jan 08, Feb 08 .... to Jul 09. i would like to pull out all the values for
each monthly period and put them in each column on sheet 2.

I think SumProduct is what i should be using but cannot get it to work; any
advice will be very gratefully received
col A Value
1/1/08 124.77
5/1/08 565.77
28/1/08 784.99
2/2/08 99.44
4/2/08 444.22
etc etc

col A Col B Col C ColD
Jan 08 Feb 08 Mar 08 Apr o8 etc to Jul 09

--
with kind regards

Spike
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default SumProduct with dates

Spike wrote:
I have column A on sheet 1 with dates from 1/1/2008 to present and column B
with values. On sheet 2 i have across row 1 all the months(with years) ie,
Jan 08, Feb 08 .... to Jul 09. i would like to pull out all the values for
each monthly period and put them in each column on sheet 2.

I think SumProduct is what i should be using but cannot get it to work; any
advice will be very gratefully received
col A Value
1/1/08 124.77
5/1/08 565.77
28/1/08 784.99
2/2/08 99.44
4/2/08 444.22
etc etc

col A Col B Col C ColD
Jan 08 Feb 08 Mar 08 Apr o8 etc to Jul 09


Assuming you have dates on sheet 2, formatted to show month and year, you could
use something like this:

=SUMPRODUCT((TEXT(A1,"mmm yy")=TEXT(Sheet1!$A$1:$A$5,"mmm yy"))*
Sheet1!$B$1:$B$5)


If you actually have text on sheet 2, then use this:

=SUMPRODUCT((A1=TEXT(Sheet1!$A$1:$A$5,"mmm yy"))*Sheet1!$B$1:$B$5)
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default SumProduct with dates

With the characters "Jan 08" in A1 (not a date formatted that way):
=sumproduct(--(text(sheet1!a1:a10,"mmm yy")=a$1),(sheet1!b1:b10))

If the cell contained an actual date:
=sumproduct(--(text(sheet1!a1:a10,"mmm yy")=text(a$1,"mmm yy")),(sheet1!b1:b10))

Spike wrote:

I have column A on sheet 1 with dates from 1/1/2008 to present and column B
with values. On sheet 2 i have across row 1 all the months(with years) ie,
Jan 08, Feb 08 .... to Jul 09. i would like to pull out all the values for
each monthly period and put them in each column on sheet 2.

I think SumProduct is what i should be using but cannot get it to work; any
advice will be very gratefully received
col A Value
1/1/08 124.77
5/1/08 565.77
28/1/08 784.99
2/2/08 99.44
4/2/08 444.22
etc etc

col A Col B Col C ColD
Jan 08 Feb 08 Mar 08 Apr o8 etc to Jul 09

--
with kind regards

Spike


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 140
Default SumProduct with dates

Spot on, thank you very much, very grateful
--
with kind regards

Spike


"Spike" wrote:

I have column A on sheet 1 with dates from 1/1/2008 to present and column B
with values. On sheet 2 i have across row 1 all the months(with years) ie,
Jan 08, Feb 08 .... to Jul 09. i would like to pull out all the values for
each monthly period and put them in each column on sheet 2.

I think SumProduct is what i should be using but cannot get it to work; any
advice will be very gratefully received
col A Value
1/1/08 124.77
5/1/08 565.77
28/1/08 784.99
2/2/08 99.44
4/2/08 444.22
etc etc

col A Col B Col C ColD
Jan 08 Feb 08 Mar 08 Apr o8 etc to Jul 09

--
with kind regards

Spike

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default SumProduct with dates

If your second sheet has label entries Jan 08 then you can use

=SUMPRODUCT(--(MONTH(Sheet1!$A1:$A5)=MONTH(E1)),Sheet1!$B1:$B5)

and if the dates are entered as actual dates but formatted to show Jan 08
you can use - the same formula!

Another way to write these is

=SUMPRODUCT((MONTH(Sheet1!$A1:$A5)=MONTH(E1))*Shee t1!$B1:$B5)

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Spike" wrote:

I have column A on sheet 1 with dates from 1/1/2008 to present and column B
with values. On sheet 2 i have across row 1 all the months(with years) ie,
Jan 08, Feb 08 .... to Jul 09. i would like to pull out all the values for
each monthly period and put them in each column on sheet 2.

I think SumProduct is what i should be using but cannot get it to work; any
advice will be very gratefully received
col A Value
1/1/08 124.77
5/1/08 565.77
28/1/08 784.99
2/2/08 99.44
4/2/08 444.22
etc etc

col A Col B Col C ColD
Jan 08 Feb 08 Mar 08 Apr o8 etc to Jul 09

--
with kind regards

Spike

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 dates Jake New Users to Excel 2 March 30th 08 05:26 PM
Sumproduct and dates Lee New Users to Excel 5 July 22nd 07 01:54 PM
sumproduct between dates Johnny M Excel Worksheet Functions 3 March 6th 07 07:10 PM
SUMPRODUCT ON DATES RagDyeR Excel Worksheet Functions 3 January 13th 05 04:21 PM
sumproduct between dates Dominique Feteau Excel Worksheet Functions 8 December 5th 04 09:56 PM


All times are GMT +1. The time now is 04:51 AM.

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"