LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Matt
 
Posts: n/a
Default return based on range of dates

That did IT!! would only work with the Generic version though for some reason
(=COUNTIF('SalesPerson'!A2:A500,"="&H2)-COUNTIF('SalesPerson'!A2:A500,""&EOMONTH(H2,0)))

Thanks a TON

"daddylonglegs" wrote:


Matt Wrote:
Wierd. After playing around, that formula works for February - December
but
isn't for January. Thank you though. I am REALLY close now


In Excel a blank cell - in date terms - is a date in January 1900 so
=MONTH(A1), when A1 is blank gives 1, i.e. January, hence your
problems. There are several other approaches which would eliminate this
problem, one is

=COUNTIF('SalesPerson'!A2:A500,"="&DATE(2006,1,1) )-COUNTIF('SalesPerson'!A2:A500,""&DATE(2006,1,31))

or for a more generic approach put the 1st day of the month you
require, e.g. 01/01/2006 in a cell, e.g. H2 and use

=COUNTIF('SalesPerson'!A2:A500,"="&H2)-COUNTIF('SalesPerson'!A2:A500,""&EOMONTH(H2,0))

Note:EOMONTH requires Analysis ToolPak


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=511912


 
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
calculating return in a range kman Excel Worksheet Functions 5 December 27th 05 12:49 AM
Automatic shading of cells based on dates??? Pedros Excel Worksheet Functions 3 October 20th 05 12:35 AM
count date occurances in range of dates... Alex Excel Worksheet Functions 2 July 27th 05 04:15 PM
Excel - return a picture or range rows as the result of a formula juststarting Excel Worksheet Functions 1 July 4th 05 12:59 AM
Can VLOOKUP return multiple answers based on several identical lo. jddtct Excel Worksheet Functions 3 January 11th 05 07:03 AM


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