Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 48
Default Can COUNTIF be nested to search two ranges

I need to use COUNTIF to search multiple ranges for combinations of answers

e.g Column A contains "colour", column B contains "shape"

I want to count how many blue circles there are etc...
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default Can COUNTIF be nested to search two ranges

I would concatenate columna A and B and then countif the concatenated string

Example:
A1 = purple
B1 = square
C1 = CONCATENATE(A1,B1) -- yields purplesquare

Assume this goes to row 10

=COUNTIF(C1:C10,"purplesquare") gives you a count of purple squares

Dave
--
Brevity is the soul of wit.


"Jimbob" wrote:

I need to use COUNTIF to search multiple ranges for combinations of answers

e.g Column A contains "colour", column B contains "shape"

I want to count how many blue circles there are etc...

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 48
Default Can COUNTIF be nested to search two ranges

Thanks Dave. I'd never heard of the concatenate function.

"Dave F" wrote:

I would concatenate columna A and B and then countif the concatenated string

Example:
A1 = purple
B1 = square
C1 = CONCATENATE(A1,B1) -- yields purplesquare

Assume this goes to row 10

=COUNTIF(C1:C10,"purplesquare") gives you a count of purple squares

Dave
--
Brevity is the soul of wit.


"Jimbob" wrote:

I need to use COUNTIF to search multiple ranges for combinations of answers

e.g Column A contains "colour", column B contains "shape"

I want to count how many blue circles there are etc...

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 320
Default Can COUNTIF be nested to search two ranges

I prefer "&" -- MUCH less to type, does same thing:
C1 has: =A1&B1

"Jimbob" wrote:

Thanks Dave. I'd never heard of the concatenate function.

"Dave F" wrote:

I would concatenate columna A and B and then countif the concatenated string

Example:
A1 = purple
B1 = square
C1 = CONCATENATE(A1,B1) -- yields purplesquare

Assume this goes to row 10

=COUNTIF(C1:C10,"purplesquare") gives you a count of purple squares

Dave
--
Brevity is the soul of wit.


"Jimbob" wrote:

I need to use COUNTIF to search multiple ranges for combinations of answers

e.g Column A contains "colour", column B contains "shape"

I want to count how many blue circles there are etc...

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 244
Default Can COUNTIF be nested to search two ranges

OR use the SUMPRODUCT function

=sumproduct(--(a1:a100="blue"),--(b1:b100="square))

would give you the total of blue squares - longer formula, but doesn't
need a new column to concatenate the result.

Dave F wrote:

I would concatenate columna A and B and then countif the concatenated string

Example:
A1 = purple
B1 = square
C1 = CONCATENATE(A1,B1) -- yields purplesquare

Assume this goes to row 10

=COUNTIF(C1:C10,"purplesquare") gives you a count of purple squares

Dave
--
Brevity is the soul of wit.


"Jimbob" wrote:

I need to use COUNTIF to search multiple ranges for combinations of answers

e.g Column A contains "colour", column B contains "shape"

I want to count how many blue circles there are etc...


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 with multiple disjoint ranges, same criteria Ron Coderre New Users to Excel 5 March 4th 06 09:11 AM
Conditional Formula to search ranges?? adean Excel Discussion (Misc queries) 2 December 13th 04 11:53 PM
Countif & ranges consisting of multiple areas Jurry Excel Worksheet Functions 2 November 15th 04 04:24 PM
Countif & ranges consisting of multiple areas Jurry Excel Worksheet Functions 1 November 15th 04 01:25 PM
Countif & ranges consisting of multiple areas Jurry Excel Worksheet Functions 1 November 15th 04 10:03 AM


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