LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default SUMIF & INDIRECT problems

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"LongTermNoob" wrote in message
...
Ah, now I see. Interesting stuff. Thanks Biff.

"T. Valko" wrote:

With SUMIF you were testing for the integer 2005 (year). The true
underlying
value of a date doesn't contain a specific integer (such as 2005) for the
year.

Dates are really just numbers formatted to look like dates. For example,
1/1/2008 is the *displayed* value of the date. However, the *true
underlying* value for that date is 39448. This number is called the
serial
date. This means that 1/1/2008 is the 39,448th day since a base date of
1/1/1900. 1/1/1900 is serial date 1. 1/1/2008 is serial date 39448.

So, the SUMIF was looking for the integer 2005 compared to the serial
dates
like 39448. The YEAR function can calculate the year number from a serial
date. =YEAR(39448) returns 2008.

--
Biff
Microsoft Excel MVP


"LongTermNoob" wrote in message
...
Many thanks Biff, it works a treat. I originally got a #VAL error and
when
I
checked it through found two date fields with "N/A" in them. Could this
have
caused the problem with SUMIF, or is it a definite no-go for this type
of
evaluation?

Thanks again, and thanks to Carim for trying to help.



"T. Valko" wrote:

You would need to use SUMPRODUCT since you're testing an array of
dates
for
the year:

=SUMPRODUCT(--(YEAR(INDIRECT("'"&A3&"'!E8:E71"))=2005),INDIRECT( "'"&A3&"'!D8:D71"))

--
Biff
Microsoft Excel MVP


"LongTermNoob" wrote in
message
...
Thanks for the info Carim, but it's still returning 0. This is the
actual
formula, rather than an example:

=SUMIF(INDIRECT("'"&A3&"'!E8:E71"),"2005",INDIRECT ("'"&A3&"'!D8:D71"))

When I evaluate the formula it appears to be looking in all the
right
places.

The date format in E8:E71 is dd-mmm-yy in case that makes a
difference.


"Carim" wrote:

Hi,

The issue is with "*05" ... "2005" works fine ..

HTH









 
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
Problems with indirect Brad Excel Discussion (Misc queries) 11 December 11th 07 07:46 PM
sumif + indirect kevcar40 Excel Discussion (Misc queries) 3 March 13th 07 03:24 PM
Indirect and Sumif Syntax Problems [email protected] Excel Discussion (Misc queries) 3 August 4th 06 01:59 AM
Problems with PULL function, INDIRECT.EXT and so forth [email protected] Excel Worksheet Functions 4 June 23rd 05 10:02 AM
Is "INDIRECT" the cause of these problems? Stephen POWELL Excel Discussion (Misc queries) 2 February 7th 05 02:21 PM


All times are GMT +1. The time now is 07:11 AM.

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"