Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Loan
 
Posts: n/a
Default Standard sumif formula not recognised

Hi,

My excel does not recognise a standard function such as
=sumif(a1:a10,month(a10),b1:b10) or =eomonth(a1), whereby column A contains
dates and column b numbers.

Please help.

Thanks,
Loan


  #2   Report Post  
byundt
 
Posts: n/a
Default

Loan,
Your formula was trying to compare a date/time serial number (3/23/05 is
38434) with a number like 1 through 12 (as returned by MONTH function). In
such a case, SUMIF should return 0.

If A1:A10 contain date/time serial numbers, you can add up the values in
column B for a given month with formulas like:
=SUMIF(A1:A10,"=" & DATEVALUE("1/1/05"),B1:B10)-SUMIF(A1:A10,"" &
DATEVALUE("1/31/05"),B1:B10) same month and year
=SUMPRODUCT((MONTH(A1:A10)=MONTH(A10))*B1:B10) same month, maybe not
same year
=SUMPRODUCT((MONTH(A1:A10)=MONTH(A10))*(YEAR(A1:A1 0)=YEAR(A10))*B1:B10)
same month and year
You'll need to format the results as a number, because Excel thinks you
intend it to be a date.

You can get the sum of values in column B for column A equalling the end of
a given month with:
=SUMIF(A1:A10,EOMONTH(A1,0),B1:B10)

  #3   Report Post  
Biff
 
Posts: n/a
Default

Hi!

=sumif(a1:a10,month(a10),b1:b10)


Assume the date in A10 8/22/2005

Here's what the formula evaluates to:

=sumif(a1:a10,8,b1:b10)

If A1:A10 does not contain a specific value of 8 then the
formula fails (returns zero).

Try this instead:

=SUMPRODUCT(--(ISNUMBER(A1:A10)),--(MONTH(A1:A10)=MONTH
(A10)),B1:B10)

=eomonth(a1)


EOMONTH requires 2 arguments. The first argument is the
Start_Date. The second argument is Months before or after
the Start_Date.

For example:

A10 = 8/22/2005

=EOMONTH(A10,0) = 8/31/2005
=EOMONTH(A10,1) = 9/30/2005
=EOMONTH(A10,-1) = 7/31/2005

Also, EOMONTH requires the Analysis ToolPak add-in be
installed. If after you add the second argument and get a
#NAME? error that means the ATP is probably not installed.

Biff

-----Original Message-----
Hi,

My excel does not recognise a standard function such as
=sumif(a1:a10,month(a10),b1:b10) or =eomonth(a1), whereby

column A contains
dates and column b numbers.

Please help.

Thanks,
Loan


.

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
Multiple SumIf Formula Rose Excel Discussion (Misc queries) 1 February 9th 05 11:50 PM
Modifyiing a SumIF Formula to look for "OLA* carl Excel Worksheet Functions 4 January 3rd 05 07:31 PM
How do I create a formula in Excel that will countif or sumif bef. bkclark Excel Worksheet Functions 4 November 10th 04 05:30 PM
Formula help SUM(IF((... HAL Excel Worksheet Functions 3 November 10th 04 03:30 PM
IF or SUMIF help for Overtime Formula Myrna Excel Worksheet Functions 2 November 8th 04 04:01 PM


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