Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 36
Default two-dimensional frequency question

i have another peculiar question. Say you have the following data:
A C
B D
B D
B E
A C
B E
A E
B D
B E
A C
B D

and you want to count how many times an "A C" is followed by a "B D," and
how many. So, output for the above would be:
1: 1
2: 1

i think the way to do it would be to sum over a frequency, but i can't
figure out how to set the bin array the way i need it. the bins would have
to start at "A C" and reset after any "A <C"

thoughts? maybe a way to do it that way or a better way entirely?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default two-dimensional frequency question


If your data is in one column within range A1:A11, then try perhaps:

=SUMPRODUCT(--($A$1:$A$11="A C"),--($A$2:$A$12="B D"))

notice the offset by 1 in the second range...


--
NBVC

Where there is a will there are many ways.
'The Code Cage' (http;//www.thecodecage.com)
------------------------------------------------------------------------
NBVC's Profile: http://www.thecodecage.com/forumz/member.php?userid=74
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=122756

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default two-dimensional frequency question

Hi,

In 2007 you can use

=COUNTIFS(A1:A11,"A C",A2:A12,"B D")

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Demosthenes" wrote:

i have another peculiar question. Say you have the following data:
A C
B D
B D
B E
A C
B E
A E
B D
B E
A C
B D

and you want to count how many times an "A C" is followed by a "B D," and
how many. So, output for the above would be:
1: 1
2: 1

i think the way to do it would be to sum over a frequency, but i can't
figure out how to set the bin array the way i need it. the bins would have
to start at "A C" and reset after any "A <C"

thoughts? maybe a way to do it that way or a better way entirely?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default two-dimensional frequency question


Although the Sumproduct() version works in both versions and Countifs()
doesn't so you can't go backwards from 2007 with Countifs()


--
NBVC

Where there is a will there are many ways.

'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
NBVC's Profile: http://www.thecodecage.com/forumz/member.php?userid=74
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=122756

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
Frequency Question Bigfoot17 Excel Worksheet Functions 10 September 17th 08 05:28 PM
Transposing from two dimensional to one dimensional VickiMc Excel Worksheet Functions 3 July 17th 08 09:00 AM
newbie question on multi-dimensional array sammus New Users to Excel 2 April 3rd 06 03:11 AM
Frequency Question -- Please Help Rothman Excel Discussion (Misc queries) 2 March 9th 06 07:21 PM
Three Dimensional Array Question Tornados Excel Discussion (Misc queries) 1 June 20th 05 12:58 AM


All times are GMT +1. The time now is 06:29 PM.

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"