#1   Report Post  
Junior Member
 
Location: Hampshire
Posts: 1
Red face CountIf Query

Morning Everybody

Need some advice on a spreadsheet. At work they are currently manually counting things in other spreadsheets to input the data on this one. Now I've managed to get half of the count if functions working but the second half i'm having trouble with. Im trying to get the spreadsheet to count the number of instances within the month of May and every variant i've tried, it keeps returning 0.

I've tried these two methods:
=COUNTIF('[Recruitment Activity Report.xls]AWE - MANPOWER 2012'!$H$10:$H$1459, "???05???")
=COUNTIF('[Recruitment Activity Report.xls]AWE - MANPOWER 2012'!$H$9:$H$176,"May")

Any help would be gratefully received

Thanks again
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 829
Default CountIf Query

"tonky16784" wrote:
Im trying to get the spreadsheet to count the number of
instances within the month of May and every variant i've
tried, it keeps returning 0. I've tried these two methods:
=COUNTIF('[Recruitment Activity Report.xls]AWE - MANPOWER
2012'!$H$10:$H$1459, "???05???")
=COUNTIF('[Recruitment Activity Report.xls]AWE - MANPOWER
2012'!$H$9:$H$176,"May")


You neglect to say what exactly what values are in column H: Excel dates;
or strings perhaps of the form "May 2012".

Assuming you have Excel dates (which might be __formatted__ to look like May
2012), try:

=SUMPRODUCT(--(MONTH('[Recruitment Activity Report.xls]AWE - MANPOWER
2012'!$H$10:$H$1459)=5))

The double-negative converts the logic values TRUE and FALSE into 1 and 0,
which SUMPRODUCT requires. Any arithmetic operation would do the same. So
suppose you want to limit the count to just May 2012 (assuming you have more
than one year of data). You would write:



=SUMPRODUCT((MONTH('[Recruitment Activity Report.xls]AWE - MANPOWER
2012'!$H$10:$H$1459)=5)
* (YEAR('[Recruitment Activity Report.xls]AWE - MANPOWER
2012'!$H$10:$H$1459)=2012))

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
Countif query Keith[_3_] Excel Worksheet Functions 2 February 16th 10 01:43 AM
COUNTIF function query Wendy-Bob[_2_] Excel Worksheet Functions 6 January 21st 09 03:05 PM
COUNTIF Query Ladymuck Excel Programming 4 September 25th 07 12:52 PM
COUNTIF Query Jack Excel Programming 8 July 11th 07 03:50 AM
Countif Query John Moore Excel Discussion (Misc queries) 4 June 25th 07 10:06 PM


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