Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kevin
 
Posts: n/a
Default How Do I use COUNTIF Combining the Text from 2 Columns

I want to do a COUNTIF using the text combine in 2 columns.
I tried using concatenate =COUNTIF(A:A&B:B,"FPP*Conn*") but I get an
formula error

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JE McGimpsey
 
Posts: n/a
Default How Do I use COUNTIF Combining the Text from 2 Columns

Not surprising it's a formula error - the first argument of COUNTIF() is
a range, not an array of text strings...

One way:

=SUMPRODUCT(--(LEFT(A1:A1000,3)="FPP"),--(LEFT(B1:B1000,4)="Conn")

For an explanation of "--" see

http://www.mcgimpsey.com/excel/doubleneg.html



In article .com,
"Kevin" wrote:

I want to do a COUNTIF using the text combine in 2 columns.
I tried using concatenate =COUNTIF(A:A&B:B,"FPP*Conn*") but I get an
formula error

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kevin
 
Posts: n/a
Default How Do I use COUNTIF Combining the Text from 2 Columns

I get zero when i try that, any other suggestions?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JE McGimpsey
 
Posts: n/a
Default How Do I use COUNTIF Combining the Text from 2 Columns

Do you have any rows for which the value in column A starts with "FPP"
and the value in the corresponding row in column B starts with "Conn"?
(Or did I misinterpret your requirements from your examples?)

It works for me in a test workbook.

In article .com,
"Kevin" wrote:

I get zero when i try that, any other suggestions?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kevin
 
Posts: n/a
Default How Do I use COUNTIF Combining the Text from 2 Columns

Col B does not start with "Conn", it contains "Conn" as part of the
string of text



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default How Do I use COUNTIF Combining the Text from 2 Columns

=SUMPRODUCT(--(ISNUMBER(SEARCH("fpp",A1:A1000))),
--(ISNUMBER(SEARCH("conn",B1:B1000))))

(all one cell).

=search() is not case sensitive (FPP, Fpp, fpp will be counted).



Kevin wrote:

Col B does not start with "Conn", it contains "Conn" as part of the
string of text


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default How Do I use COUNTIF Combining the Text from 2 Columns

Perhaps something like this?:

For values in A1:B100

B1: =SUMPRODUCT((LEFT(A1:A100,3)="FPP")*(ISNUMBER(SEAR CH("CONN",B1:B100))))

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Kevin" wrote:

I want to do a COUNTIF using the text combine in 2 columns.
I tried using concatenate =COUNTIF(A:A&B:B,"FPP*Conn*") but I get an
formula error


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default How Do I use COUNTIF Combining the Text from 2 Columns

Of course the formula couldn't be in B1...Anyplace other than Col_A or Col_B
would work, though.


***********
Regards,
Ron

XL2002, WinXP-Pro


"Ron Coderre" wrote:

Perhaps something like this?:

For values in A1:B100

B1: =SUMPRODUCT((LEFT(A1:A100,3)="FPP")*(ISNUMBER(SEAR CH("CONN",B1:B100))))

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Kevin" wrote:

I want to do a COUNTIF using the text combine in 2 columns.
I tried using concatenate =COUNTIF(A:A&B:B,"FPP*Conn*") but I get an
formula error


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
Turn Off Text To Columns Rcih Excel Discussion (Misc queries) 2 February 8th 06 09:11 PM
COUNTIF according to presence of string within text Ingeniero1 Excel Worksheet Functions 5 February 1st 06 06:43 PM
Excel is automatically doing "text to columns" upon paste text. robert10000 Excel Discussion (Misc queries) 1 June 15th 05 07:49 PM
Text to Columns - moves text up Stoofer Excel Discussion (Misc queries) 2 February 19th 05 10:04 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 09:39 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"