LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 111
Default Count by date and hour

=SUMPRODUCT(--(A1:A100="07/01/06"+0),--(HOUR(B1:B100)=10))
Sumproduct likes to work with numbers, but the tests above will return
logical values, either True or False. -- will turn the logical values into
numbers, either 1 for true or 0 for false. The first - will make a true -1.
The 2nd will turn the negative 1 to a positive 1. Negating false returns 0
(both times.)

Bob Phillips has a very useful explanation of Sumproduct. Let me dig up the
link ...
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
Also, this link explains the --:
http://www.mcgimpsey.com/excel/formulae/doubleneg.html

--
Kevin Vaughn


"ChristiaanV" wrote:


Out of curiosity, what exactly are the double dashes, and what do they
do?


--
ChristiaanV
------------------------------------------------------------------------
ChristiaanV's Profile: http://www.excelforum.com/member.php...o&userid=37363
View this thread: http://www.excelforum.com/showthread...hreadid=570571




 
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
Comparing specific date and hour with NOW() Memoman Excel Worksheet Functions 1 July 15th 06 10:14 PM
Extract the hour from a cell showing the date and time Paul Sexton Excel Worksheet Functions 2 February 27th 06 06:15 PM
change date based on time kdp145 Excel Discussion (Misc queries) 7 December 14th 05 02:05 AM
How to calculate Date & Time differences robs Excel Worksheet Functions 2 October 4th 05 04:22 PM
Count items between specific hours on a matching date KS Excel Worksheet Functions 1 December 10th 04 05:52 PM


All times are GMT +1. The time now is 10:27 PM.

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"