Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default figure to date totals based on month

It still gives me #VALUE! as the result. Sorry.

"Teethless mama" wrote:

=SUMPRODUCT(--(MONTH($H$2:$S$2)<=MONTH(C5)),H5:S5)


"Office User" wrote:

I'm trying to figure year to date totals based on month. The formula needs
to figure a person's total hours of vacation used since anniversary month
(which is just the month of their hire date). I have a spreadsheet with
month headings Jan thru Dec in H2:S2 with vacation hours taken each month by
each employee in rows under these headings. It looks something like this:

Jan Feb Mar . . .
10 0 10
0 8 0
2 0 0

If the first person started working in March, their total YTD needs to just
add months March through Dec, but the next person may have started in Sept so
that line needs to add months Sept through Dec.

With hire date in column C, month headings in H2:S2, and data in row 5,
here's the formula I have tried but receive #VALUE!

=SUMPRODUCT(--(--(MONTH($H$2:$S$2))<=(MONTH(C5))),--(--(H5:S5)))

Any help will be greatly appreciated. Thanks,
Marcia

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default figure to date totals based on month

Actually the formula works if I change my month names to numbers (ie 1 for
Jan, 2 for Feb, etc) in the headings in H2:S2. Since the spreadsheet needs
to be setup with month names instead of numbers, I just used a different cell
(and then hid it) to convert the month(c5) into a name using TEXT function.

Thanks for getting me on the right track.
Marcia

"Office User" wrote:

It still gives me #VALUE! as the result. Sorry.

"Teethless mama" wrote:

=SUMPRODUCT(--(MONTH($H$2:$S$2)<=MONTH(C5)),H5:S5)


"Office User" wrote:

I'm trying to figure year to date totals based on month. The formula needs
to figure a person's total hours of vacation used since anniversary month
(which is just the month of their hire date). I have a spreadsheet with
month headings Jan thru Dec in H2:S2 with vacation hours taken each month by
each employee in rows under these headings. It looks something like this:

Jan Feb Mar . . .
10 0 10
0 8 0
2 0 0

If the first person started working in March, their total YTD needs to just
add months March through Dec, but the next person may have started in Sept so
that line needs to add months Sept through Dec.

With hire date in column C, month headings in H2:S2, and data in row 5,
here's the formula I have tried but receive #VALUE!

=SUMPRODUCT(--(--(MONTH($H$2:$S$2))<=(MONTH(C5))),--(--(H5:S5)))

Any help will be greatly appreciated. Thanks,
Marcia

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default figure to date totals based on month

Check to make sure your H2:S2 and C5 are the real date
ie =COUNT(H2:S2)=12
If it is a real date it will return TRUE, else FALSE

"Office User" wrote:

It still gives me #VALUE! as the result. Sorry.

"Teethless mama" wrote:

=SUMPRODUCT(--(MONTH($H$2:$S$2)<=MONTH(C5)),H5:S5)


"Office User" wrote:

I'm trying to figure year to date totals based on month. The formula needs
to figure a person's total hours of vacation used since anniversary month
(which is just the month of their hire date). I have a spreadsheet with
month headings Jan thru Dec in H2:S2 with vacation hours taken each month by
each employee in rows under these headings. It looks something like this:

Jan Feb Mar . . .
10 0 10
0 8 0
2 0 0

If the first person started working in March, their total YTD needs to just
add months March through Dec, but the next person may have started in Sept so
that line needs to add months Sept through Dec.

With hire date in column C, month headings in H2:S2, and data in row 5,
here's the formula I have tried but receive #VALUE!

=SUMPRODUCT(--(--(MONTH($H$2:$S$2))<=(MONTH(C5))),--(--(H5:S5)))

Any help will be greatly appreciated. Thanks,
Marcia

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default figure to date totals based on month

I posted that I had it working after changing my headings from month names to
numbers. It does add but is adding all the months. If C5 is 7/14/05 then it
should only add the numbers under columns July through December. Here's the
formula currently being used.
=SUMPRODUCT(--(MONTH($H$2:$S$2)<=MONTH(C5)),H5:S5)

In addition, they've now given me a twist. The way they've previously used
the spreadsheet is to list only the previous 12 months. So this month, it
will show Jan 06 through Dec 06 but next month it will show Feb 06 through
Jan 06. Since each person's vacation total is figured for a whole year but
based on the month they started will SUMPRODUCT be able to distinguish this?

Thanks again,
Marcia

"Teethless mama" wrote:

Check to make sure your H2:S2 and C5 are the real date
ie =COUNT(H2:S2)=12
If it is a real date it will return TRUE, else FALSE

"Office User" wrote:

It still gives me #VALUE! as the result. Sorry.

"Teethless mama" wrote:

=SUMPRODUCT(--(MONTH($H$2:$S$2)<=MONTH(C5)),H5:S5)


"Office User" wrote:

I'm trying to figure year to date totals based on month. The formula needs
to figure a person's total hours of vacation used since anniversary month
(which is just the month of their hire date). I have a spreadsheet with
month headings Jan thru Dec in H2:S2 with vacation hours taken each month by
each employee in rows under these headings. It looks something like this:

Jan Feb Mar . . .
10 0 10
0 8 0
2 0 0

If the first person started working in March, their total YTD needs to just
add months March through Dec, but the next person may have started in Sept so
that line needs to add months Sept through Dec.

With hire date in column C, month headings in H2:S2, and data in row 5,
here's the formula I have tried but receive #VALUE!

=SUMPRODUCT(--(--(MONTH($H$2:$S$2))<=(MONTH(C5))),--(--(H5:S5)))

Any help will be greatly appreciated. Thanks,
Marcia

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
Date arithmetic: adding 1 month to prior end of month date manxman Excel Worksheet Functions 2 July 14th 06 09:29 PM
Month to date calculations CP Excel Worksheet Functions 5 February 12th 06 06:44 PM
Formula = Today's date + 1 month jermsalerms Excel Worksheet Functions 5 February 8th 06 09:51 AM
HELP with this function Jay Excel Worksheet Functions 7 May 24th 05 06:45 PM
Subtract a group of cells from a total based on ending date Nicholas Scarpinato Excel Discussion (Misc queries) 0 May 17th 05 03:25 PM


All times are GMT +1. The time now is 10:21 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"