Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mary-Lou
 
Posts: n/a
Default Need help with Countif function

I need to count two different text values within two columns.

Column A contains sentences and Column B contains various values.

Example of small sentences in Column A:
Custom XX Upgrade
Printing reports on XX
Custom YY Upgrade

Example of values in Column B:
AAAA
BBBB
BBBB

What I need to do is count groups of records, like only counting the records
that contain €œXX€ anyplace witihin Column A plus have €œXXXX€ in Column B.

I tried countif statements with no success. Any ideas?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default Need help with Countif function

One way ..

Assuming data in cols A and B are within A1:B100

With the values listed say,
in D1: XX, in E1: XXXX

we could put in F1:
=SUMPRODUCT((ISNUMBER(SEARCH(TRIM(D1),$A$1:$A$100) )*ISNUMBER(SEARCH(TRIM(E1),$B$1:$B$100))))

SEARCH is not case sensitive. We could replace SEARCH with FIND if case
sensitivty is required for the values listed in D1:E1
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Mary-Lou" wrote:
I need to count two different text values within two columns.

Column A contains sentences and Column B contains various values.

Example of small sentences in Column A:
Custom XX Upgrade
Printing reports on XX
Custom YY Upgrade

Example of values in Column B:
AAAA
BBBB
BBBB

What I need to do is count groups of records, like only counting the records
that contain €œXX€ anyplace witihin Column A plus have €œXXXX€ in Column B.

I tried countif statements with no success. Any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mary-Lou
 
Posts: n/a
Default Need help with Countif function

Thanks. When I enter the array forumula, the cell value displays zero
(which is incorrect). But when I edit the function, the 'formula results"
displays 163 (which is correct). Why wouldn't the 163 display in the cell?

"Max" wrote:

One way ..

Assuming data in cols A and B are within A1:B100

With the values listed say,
in D1: XX, in E1: XXXX

we could put in F1:
=SUMPRODUCT((ISNUMBER(SEARCH(TRIM(D1),$A$1:$A$100) )*ISNUMBER(SEARCH(TRIM(E1),$B$1:$B$100))))

SEARCH is not case sensitive. We could replace SEARCH with FIND if case
sensitivty is required for the values listed in D1:E1
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Mary-Lou" wrote:
I need to count two different text values within two columns.

Column A contains sentences and Column B contains various values.

Example of small sentences in Column A:
Custom XX Upgrade
Printing reports on XX
Custom YY Upgrade

Example of values in Column B:
AAAA
BBBB
BBBB

What I need to do is count groups of records, like only counting the records
that contain €œXX€ anyplace witihin Column A plus have €œXXXX€ in Column B.

I tried countif statements with no success. Any ideas?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default Need help with Countif function

"Mary-Lou" wrote:
Thanks. When I enter the array forumula, the cell value displays zero
(which is incorrect). But when I edit the function, the 'formula results"
displays 163 (which is correct). Why wouldn't the 163 display in the cell?


Don't remember saying it is an array formula, requiring CSE <g.

Just press normal ENTER to confirm the formula,
after pasting/placing it within the formula bar

(just correct the inadvertent line breaks in the formula
when you copy paste it direct from the post)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mary-Lou
 
Posts: n/a
Default Need help with Countif function

I tried it both ways - same results.

"Max" wrote:

"Mary-Lou" wrote:
Thanks. When I enter the array forumula, the cell value displays zero
(which is incorrect). But when I edit the function, the 'formula results"
displays 163 (which is correct). Why wouldn't the 163 display in the cell?


Don't remember saying it is an array formula, requiring CSE <g.

Just press normal ENTER to confirm the formula,
after pasting/placing it within the formula bar

(just correct the inadvertent line breaks in the formula
when you copy paste it direct from the post)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default Need help with Countif function

"Mary-Lou" wrote:
I tried it both ways - same results.


Perhaps you could paste the actual formula you're using ??
(assume you've adapted it)

In adapting to suit, pl note that entire col references (eg: A:A, B:B)
cannot be used in SUMPRODUCT, and the ranges used should be identical in
size, eg: $A$1:$A$1000, $B$1:$B$1000
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mary-Lou
 
Posts: n/a
Default Need help with Countif function

Hey, I did finally get it to work! I had copied the forumla several times
in my worksheet and D1 and E1 values had been adjusted in the copies - so
once I put them back to what they should have been - BINGO! I will make them
absolute so they don't change.

Thanks very much.

"Mary-Lou" wrote:

I tried it both ways - same results.

"Max" wrote:

"Mary-Lou" wrote:
Thanks. When I enter the array forumula, the cell value displays zero
(which is incorrect). But when I edit the function, the 'formula results"
displays 163 (which is correct). Why wouldn't the 163 display in the cell?


Don't remember saying it is an array formula, requiring CSE <g.

Just press normal ENTER to confirm the formula,
after pasting/placing it within the formula bar

(just correct the inadvertent line breaks in the formula
when you copy paste it direct from the post)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Need help with Countif function

Hi!

Try this:

=SUMPRODUCT(--(ISNUMBER(SEARCH("XX",A1:A100))),--(B1:B100="XXXX"))

Biff

"Mary-Lou" wrote in message
...
I need to count two different text values within two columns.

Column A contains sentences and Column B contains various values.

Example of small sentences in Column A:
Custom XX Upgrade
Printing reports on XX
Custom YY Upgrade

Example of values in Column B:
AAAA
BBBB
BBBB

What I need to do is count groups of records, like only counting the
records
that contain "XX" anyplace witihin Column A plus have "XXXX" in Column B.

I tried countif statements with no success. Any ideas?



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mary-Lou
 
Posts: n/a
Default Need help with Countif function

Thanks. I'm getting the same results when I tried the array Max included - 0
value displays within the cell, but when editting the function, the formula
results display a value.

The sentences within Column A can be really wonky and could be very long -
can the funny results be because of the data within Column A?

"Biff" wrote:

Hi!

Try this:

=SUMPRODUCT(--(ISNUMBER(SEARCH("XX",A1:A100))),--(B1:B100="XXXX"))

Biff

"Mary-Lou" wrote in message
...
I need to count two different text values within two columns.

Column A contains sentences and Column B contains various values.

Example of small sentences in Column A:
Custom XX Upgrade
Printing reports on XX
Custom YY Upgrade

Example of values in Column B:
AAAA
BBBB
BBBB

What I need to do is count groups of records, like only counting the
records
that contain "XX" anyplace witihin Column A plus have "XXXX" in Column B.

I tried countif statements with no success. Any ideas?




  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Need help with Countif function

Hi!

Try breaking the formula into 2 formulas and see what you get:

Formula to count just column A:

=SUMPRODUCT(--(ISNUMBER(SEARCH("XX",A1:A100))))

Formula to count just column B:

=SUMPRODUCT(--(B1:B100="XXXX"))

Do either of these return 0?

Biff

"Mary-Lou" wrote in message
...
Thanks. I'm getting the same results when I tried the array Max
included - 0
value displays within the cell, but when editting the function, the
formula
results display a value.

The sentences within Column A can be really wonky and could be very long -
can the funny results be because of the data within Column A?

"Biff" wrote:

Hi!

Try this:

=SUMPRODUCT(--(ISNUMBER(SEARCH("XX",A1:A100))),--(B1:B100="XXXX"))

Biff

"Mary-Lou" wrote in message
...
I need to count two different text values within two columns.

Column A contains sentences and Column B contains various values.

Example of small sentences in Column A:
Custom XX Upgrade
Printing reports on XX
Custom YY Upgrade

Example of values in Column B:
AAAA
BBBB
BBBB

What I need to do is count groups of records, like only counting the
records
that contain "XX" anyplace witihin Column A plus have "XXXX" in Column
B.

I tried countif statements with no success. Any ideas?








  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mary-Lou
 
Posts: n/a
Default Need help with Countif function

I broke it out, and I get results with the first one OK, but get 0 on the
seond one (but when editting the function, the formula displays a value).

"Biff" wrote:

Hi!

Try breaking the formula into 2 formulas and see what you get:

Formula to count just column A:

=SUMPRODUCT(--(ISNUMBER(SEARCH("XX",A1:A100))))

Formula to count just column B:

=SUMPRODUCT(--(B1:B100="XXXX"))

Do either of these return 0?

Biff

"Mary-Lou" wrote in message
...
Thanks. I'm getting the same results when I tried the array Max
included - 0
value displays within the cell, but when editting the function, the
formula
results display a value.

The sentences within Column A can be really wonky and could be very long -
can the funny results be because of the data within Column A?

"Biff" wrote:

Hi!

Try this:

=SUMPRODUCT(--(ISNUMBER(SEARCH("XX",A1:A100))),--(B1:B100="XXXX"))

Biff

"Mary-Lou" wrote in message
...
I need to count two different text values within two columns.

Column A contains sentences and Column B contains various values.

Example of small sentences in Column A:
Custom XX Upgrade
Printing reports on XX
Custom YY Upgrade

Example of values in Column B:
AAAA
BBBB
BBBB

What I need to do is count groups of records, like only counting the
records
that contain "XX" anyplace witihin Column A plus have "XXXX" in Column
B.

I tried countif statements with no success. Any ideas?







  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Need help with Countif function

I'm confused.........

You're reply to Max says you got it working. Is it working or not?

The only difference, other than syntax, between mine and Max's formulas is
the use of the TRIM function on the criteria cells.

Biff

"Mary-Lou" wrote in message
...
I broke it out, and I get results with the first one OK, but get 0 on the
seond one (but when editting the function, the formula displays a value).

"Biff" wrote:

Hi!

Try breaking the formula into 2 formulas and see what you get:

Formula to count just column A:

=SUMPRODUCT(--(ISNUMBER(SEARCH("XX",A1:A100))))

Formula to count just column B:

=SUMPRODUCT(--(B1:B100="XXXX"))

Do either of these return 0?

Biff

"Mary-Lou" wrote in message
...
Thanks. I'm getting the same results when I tried the array Max
included - 0
value displays within the cell, but when editting the function, the
formula
results display a value.

The sentences within Column A can be really wonky and could be very
long -
can the funny results be because of the data within Column A?

"Biff" wrote:

Hi!

Try this:

=SUMPRODUCT(--(ISNUMBER(SEARCH("XX",A1:A100))),--(B1:B100="XXXX"))

Biff

"Mary-Lou" wrote in message
...
I need to count two different text values within two columns.

Column A contains sentences and Column B contains various values.

Example of small sentences in Column A:
Custom XX Upgrade
Printing reports on XX
Custom YY Upgrade

Example of values in Column B:
AAAA
BBBB
BBBB

What I need to do is count groups of records, like only counting the
records
that contain "XX" anyplace witihin Column A plus have "XXXX" in
Column
B.

I tried countif statements with no success. Any ideas?









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
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
CountIf Function Question Josh in Indy Excel Discussion (Misc queries) 4 April 6th 06 08:28 PM
CountIF Function On Linked Spreadsheet Josh in Indy Excel Discussion (Misc queries) 0 April 5th 06 05:09 PM
can you use countif function for noncontiguous cells rutledbr Excel Worksheet Functions 2 November 13th 05 09:15 PM
Excel option to store trendline's coefficients in cells for use Miguel Saldana Charts and Charting in Excel 9 June 20th 05 08:45 PM


All times are GMT +1. The time now is 09:35 AM.

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"