A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

COUNT: Counting the number of times "X" comes up after the occurrence of "Y"



 
 
Thread Tools Display Modes
  #1  
Old August 2nd, 2004, 04:51 PM
DrSues02
external usenet poster
 
Posts: n/a
Default COUNT: Counting the number of times "X" comes up after the occurrence of "Y"

I am having trouble with the count function and setting it up to work in
my spreadsheet.

Basically, I want to count the number of times that X comes up in a
row, but ONLY have the occurence of Y.

Basically, my rows are set up like this:

W, L, W, W, L, L, W

I want to count the number of times a "W" comes up after an "L".
However, I don't want it to count ALL of the "W". I needs to only
count the W when it is in the cell directly to the right of an "L".

Any ideas?

Thanks


---
Message posted from http://www.ExcelForum.com/

  #2  
Old August 2nd, 2004, 05:16 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default COUNT: Counting the number of times "X" comes up after the occurrence of "Y"

Hi
try
=SUMPRODUCT(--(A1:W1="L"),--(B1:X1="W"))

--
Regards
Frank Kabel
Frankfurt, Germany


I am having trouble with the count function and setting it up to work
in my spreadsheet.

Basically, I want to count the number of times that X comes up in a
row, but ONLY have the occurence of Y.

Basically, my rows are set up like this:

W, L, W, W, L, L, W

I want to count the number of times a "W" comes up after an "L".
However, I don't want it to count ALL of the "W". I needs to only
count the W when it is in the cell directly to the right of an "L".

Any ideas?

Thanks


---
Message posted from http://www.ExcelForum.com/


  #3  
Old August 2nd, 2004, 07:55 PM
kfotedar
external usenet poster
 
Posts: n/a
Default COUNT: Counting the number of times "X" comes up after the occurrence of "Y"

Frank:

I asked this question earlier and I forgot in which thread I had
asked...but here goes...

what does "--" in the sumproduct formula mean...am eager to know..

Thanks,

Kavir


---
Message posted from http://www.ExcelForum.com/

  #4  
Old August 2nd, 2004, 08:34 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default COUNT: Counting the number of times "X" comes up after the occurrence of "Y"

Hi
this double minus (unary operator) coerces the boolean values
(TRUE/FALSE) ro numeric values (1/0)

--
Regards
Frank Kabel
Frankfurt, Germany


Frank:

I asked this question earlier and I forgot in which thread I had
asked...but here goes...

what does "--" in the sumproduct formula mean...am eager to know..

Thanks,

Kavir


---
Message posted from http://www.ExcelForum.com/


  #5  
Old August 3rd, 2004, 01:53 AM
kfotedar
external usenet poster
 
Posts: n/a
Default COUNT: Counting the number of times "X" comes up after the occurrence of "Y"

Frank:

You mean wherever the result would have been True/False, this forces it
to be 1/0?

Where else can you use it apart from sumproduct function.

I tend to use the sumproduct function a lot and have fount it a very
unique and powerful function a good replacement for the array
functions.

Thanks,

Kavir


---
Message posted from http://www.ExcelForum.com/

  #6  
Old August 3rd, 2004, 06:35 AM
Frank Kabel
external usenet poster
 
Posts: n/a
Default COUNT: Counting the number of times "X" comes up after the occurrence of "Y"

Hi
you can also use it for converting numbers which are stored as text to
real numbers. e.g.
A1: ABC123

With the fomurla
=RIFHT(A1,3)
you would get '123'. But the result would be a text. Use
=--RIGHT(A1,3)
and you'll get a number


--
Regards
Frank Kabel
Frankfurt, Germany


Frank:

You mean wherever the result would have been True/False, this forces
it to be 1/0?

Where else can you use it apart from sumproduct function.

I tend to use the sumproduct function a lot and have fount it a very
unique and powerful function a good replacement for the array
functions.

Thanks,

Kavir


---
Message posted from http://www.ExcelForum.com/


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting number of certain entries Holly Cetron Running & Setting Up Queries 2 June 9th, 2004 12:46 AM
Counting Number of Occurences of Various Times Frank Kabel Worksheet Functions 4 May 26th, 2004 03:38 PM
Count number of occurances in column acorbally Worksheet Functions 0 May 3rd, 2004 06:09 PM
Count number of chars or digits in a cell? Parse out last char? RF Worksheet Functions 3 March 17th, 2004 08:03 PM
count number of times a word appears in a column Tushar Mehta Charts and Charting 0 November 15th, 2003 12:23 AM


All times are GMT +1. The time now is 07:14 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.