Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default using a countif with multiple columns

I'm trying to count records if in col c(c2:c160) the value is =2 and in
col j(j2:j160) the value is between 1-7.

If the criteria matches count that as one record.

Any help would be much appreciated

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK
 
Posts: n/a
Default using a countif with multiple columns

Try this array* formula:

=SUM(IF((C$2:C$160=2)*(J$2:J$160=1)*(J$2:J$160<=7 ),1,0))

* As this is an array formula, once you have typed it in (or
subsequently edit it) you must use CTRL-SHIFT-ENTER instead of just
ENTER. If you do this correctly then Excel will wrap curly braces { }
around the formula - you must not type these yourself.

Hope this helps.

Pete

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Arvi Laanemets
 
Posts: n/a
Default using a countif with multiple columns

Hi

=SUMPRODUCT(--(C2:C160=2),--(J2:J160=1),--(J2:J160<=7))

Arvi Laanemets


wrote in message
ups.com...
I'm trying to count records if in col c(c2:c160) the value is =2 and in
col j(j2:j160) the value is between 1-7.

If the criteria matches count that as one record.

Any help would be much appreciated



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default using a countif with multiple columns

Why do you have to use CTRL-SHIFT-ENTER instead of just ENTER? What
difference does that make?

"Pete_UK" wrote:

Try this array* formula:

=SUM(IF((C$2:C$160=2)*(J$2:J$160=1)*(J$2:J$160<=7 ),1,0))

* As this is an array formula, once you have typed it in (or
subsequently edit it) you must use CTRL-SHIFT-ENTER instead of just
ENTER. If you do this correctly then Excel will wrap curly braces { }
around the formula - you must not type these yourself.

Hope this helps.

Pete


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
How to print multiple columns on same page ocpsduke Excel Discussion (Misc queries) 2 October 8th 05 06:19 PM
sorting data across multiple columns Spiderman Excel Discussion (Misc queries) 2 October 6th 05 11:55 PM
COUNTIF - multiple conditions allphin Excel Worksheet Functions 4 September 18th 05 04:05 PM
Pivot Table combining multiple columns Pete Petersen Excel Discussion (Misc queries) 1 January 13th 05 07:56 PM
Filtering Text Data from Multiple columns Brad Excel Worksheet Functions 6 January 1st 05 03:32 PM


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