Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ronbo
 
Posts: n/a
Default CountIf Conditions / Occurrences

I have data arranged as follows;


A B C D
1 blank
2 blank
3 7 0 3 4
4 0 3 3 1
5 blank
6 blank
7 3 4 3 4
8 0 0 3 1
9 blank
10 blank

The data range is large with the above layout. What I am trying to develop
is a function / routine that will give me the number of occurrences in range
A1:D10 of (0 - 3 or 3 - 0) which would = 2.

This is just for fun... don't waste time on it, from what I have found it
looks very difficult. But maybe it's simple.

Thanks,
Ronbo




  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default CountIf Conditions / Occurrences


Don't know what you mean.0-3 or 3-0? Do you mean all in one cell or 0 in
one cell and 3 in adjacent cell in the same row or same column. I don't
see how you get 2 from your example


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=508591

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default CountIf Conditions / Occurrences

Hi!

Why is the expected result 2 and not 3?

Biff

"Ronbo" wrote in message
...
I have data arranged as follows;


A B C D
1 blank
2 blank
3 7 0 3 4
4 0 3 3 1
5 blank
6 blank
7 3 4 3 4
8 0 0 3 1
9 blank
10 blank

The data range is large with the above layout. What I am trying to
develop
is a function / routine that will give me the number of occurrences in
range
A1:D10 of (0 - 3 or 3 - 0) which would = 2.

This is just for fun... don't waste time on it, from what I have found it
looks very difficult. But maybe it's simple.

Thanks,
Ronbo






  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default CountIf Conditions / Occurrences

Hmmm.....

I think I figured it out. I don't know about doing this with just a single
formula, though.

Maybe in cell F4 enter this formula as an array using the key combo of
CTRL,SHIFT,ENTER:

=SUMPRODUCT(--(ISNUMBER(FIND({"03","30"},TRANSPOSE(A3:D3&A4:D4)) )))

Copy into cell F8

Then, just do a Sum on column F:

=SUM(F:F)

Biff

"Biff" wrote in message
...
Hi!

Why is the expected result 2 and not 3?

Biff

"Ronbo" wrote in message
...
I have data arranged as follows;


A B C D
1 blank
2 blank
3 7 0 3 4
4 0 3 3 1
5 blank
6 blank
7 3 4 3 4
8 0 0 3 1
9 blank
10 blank

The data range is large with the above layout. What I am trying to
develop
is a function / routine that will give me the number of occurrences in
range
A1:D10 of (0 - 3 or 3 - 0) which would = 2.

This is just for fun... don't waste time on it, from what I have found it
looks very difficult. But maybe it's simple.

Thanks,
Ronbo








  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ronbo
 
Posts: n/a
Default CountIf Conditions / Occurrences

They are in pairs. In other words 7-0 is a pair, 0-3 is a pair, 3-3 is a
pair and 4-1 is a pair. Thus in the first set of data 0-3 occures once. In
the second set of data 3-0 occures once, so I would have two occurrences ( it
is either way 3-0 or 0-3)

"Biff" wrote:

Hi!

Why is the expected result 2 and not 3?

Biff

"Ronbo" wrote in message
...
I have data arranged as follows;


A B C D
1 blank
2 blank
3 7 0 3 4
4 0 3 3 1
5 blank
6 blank
7 3 4 3 4
8 0 0 3 1
9 blank
10 blank

The data range is large with the above layout. What I am trying to
develop
is a function / routine that will give me the number of occurrences in
range
A1:D10 of (0 - 3 or 3 - 0) which would = 2.

This is just for fun... don't waste time on it, from what I have found it
looks very difficult. But maybe it's simple.

Thanks,
Ronbo









  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default CountIf Conditions / Occurrences

OK, that's what the formula in my other reply does.

Biff

"Ronbo" wrote in message
...
They are in pairs. In other words 7-0 is a pair, 0-3 is a pair, 3-3 is a
pair and 4-1 is a pair. Thus in the first set of data 0-3 occures once.
In
the second set of data 3-0 occures once, so I would have two occurrences
( it
is either way 3-0 or 0-3)

"Biff" wrote:

Hi!

Why is the expected result 2 and not 3?

Biff

"Ronbo" wrote in message
...
I have data arranged as follows;


A B C D
1 blank
2 blank
3 7 0 3 4
4 0 3 3 1
5 blank
6 blank
7 3 4 3 4
8 0 0 3 1
9 blank
10 blank

The data range is large with the above layout. What I am trying to
develop
is a function / routine that will give me the number of occurrences in
range
A1:D10 of (0 - 3 or 3 - 0) which would = 2.

This is just for fun... don't waste time on it, from what I have found
it
looks very difficult. But maybe it's simple.

Thanks,
Ronbo









  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default CountIf Conditions / Occurrences

This is even better and is not an array. Normally entered:

=SUMPRODUCT(--(ISNUMBER(MATCH(A3:D3&A4:D4,{"03","30"},0))))

Biff

"Biff" wrote in message
...
Hmmm.....

I think I figured it out. I don't know about doing this with just a single
formula, though.

Maybe in cell F4 enter this formula as an array using the key combo of
CTRL,SHIFT,ENTER:

=SUMPRODUCT(--(ISNUMBER(FIND({"03","30"},TRANSPOSE(A3:D3&A4:D4)) )))

Copy into cell F8

Then, just do a Sum on column F:

=SUM(F:F)

Biff

"Biff" wrote in message
...
Hi!

Why is the expected result 2 and not 3?

Biff

"Ronbo" wrote in message
...
I have data arranged as follows;


A B C D
1 blank
2 blank
3 7 0 3 4
4 0 3 3 1
5 blank
6 blank
7 3 4 3 4
8 0 0 3 1
9 blank
10 blank

The data range is large with the above layout. What I am trying to
develop
is a function / routine that will give me the number of occurrences in
range
A1:D10 of (0 - 3 or 3 - 0) which would = 2.

This is just for fun... don't waste time on it, from what I have found
it
looks very difficult. But maybe it's simple.

Thanks,
Ronbo










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 Multiple Conditions Paul Sheppard Excel Discussion (Misc queries) 5 December 28th 05 07:03 PM
COUNTIF function when 2 conditions exist? Inquiring Minds Excel Worksheet Functions 1 November 29th 05 06:09 PM
COUNTIF - multiple conditions allphin Excel Worksheet Functions 4 September 18th 05 04:05 PM
COUNTIF for 2 conditions Bruce Excel Worksheet Functions 4 June 15th 05 01:22 PM
Counting occurrences of multiple conditions Jvanderv1 Excel Discussion (Misc queries) 2 April 6th 05 01:07 AM


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