#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default IF Statement

I am trying to create an IF that looks for a date range from one column and
then counts items in another column. The formula I have below is not looking
at the MONTH field. Any suggestions? Thanks!

=IF(MONTH(SHEET1!A2:A500*(2)),COUNTIF(SHEET1!G2:G5 00,"Successful"))

MONTH is looking at SHEET1 in cells A2 to A500 for February (2 month)
The next statement should look at only February data and then count how many
times the word "Successful" is found.

  #2   Report Post  
Posted to microsoft.public.excel.misc
jim jim is offline
external usenet poster
 
Posts: 11
Default IF Statement

Hi Jeff,

If I understand you right, you should be able to use SUMPRODUCT. So
let's say column A contains a series of dates and column B contains a
list of corresponding values, of which you're interested in matching on
the word "successful." If that's the case, try this:

=SUMPRODUCT(--(MONTH(Sheet1!A2:A500)=2),--(Sheet1!G2:G500="Successful"))

This will look for all instances where the month = 2 (February) and
return a count of the corresponding columns that contain the string
"Successful."


Jim



Jeff H. wrote:
I am trying to create an IF that looks for a date range from one column and
then counts items in another column. The formula I have below is not looking
at the MONTH field. Any suggestions? Thanks!

=IF(MONTH(SHEET1!A2:A500*(2)),COUNTIF(SHEET1!G2:G5 00,"Successful"))

MONTH is looking at SHEET1 in cells A2 to A500 for February (2 month)
The next statement should look at only February data and then count how many
times the word "Successful" is found.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default IF Statement

One option would be to create a helper column which concatenates (joins) the
two columns, and run your COUNTIF on that.

Example: =CONCATENATE(MONTH(A2),G2)

Fill that down as necessary, and then, assuming the concatenation is done in
column J, you could use the COUNTIF function: =COUNTIF(J2:J500="2Successful")
--
Brevity is the soul of wit.


"Jeff H." wrote:

I am trying to create an IF that looks for a date range from one column and
then counts items in another column. The formula I have below is not looking
at the MONTH field. Any suggestions? Thanks!

=IF(MONTH(SHEET1!A2:A500*(2)),COUNTIF(SHEET1!G2:G5 00,"Successful"))

MONTH is looking at SHEET1 in cells A2 to A500 for February (2 month)
The next statement should look at only February data and then count how many
times the word "Successful" is found.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default IF Statement

Thank you both for your help. I really appreciate your assistance.


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
SQL concatenation statement CLamar Excel Discussion (Misc queries) 0 June 29th 06 01:58 PM
Can't add 7th IF statement to long formula. manxman Excel Worksheet Functions 7 June 8th 06 08:23 AM
SET statement tutorial Daminc Excel Discussion (Misc queries) 13 January 17th 06 04:47 PM
If statement Matt Montagliano Excel Discussion (Misc queries) 1 September 8th 05 08:47 PM
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM


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