+ Reply to Thread
Results 1 to 7 of 7

Frequency of associated numbers in a table

  1. #1
    Registered User
    Join Date
    11-17-2007
    Posts
    28

    Frequency of associated numbers in a table

    Hi,

    I am looking to find the frequency of times 1 number appears with another number in a row in a table

    Click here for an example

    or see the attached spreadsheet. I included the excel 2007 and 2003 versions.


    Thanks
    Last edited by telcotech; 03-08-2009 at 03:58 PM. Reason: SOLVED

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Frequency of associated numbers in a table

    Looks to me that the table at the top IS the table you describe. If not, please complete a portion of the lower table manually and explain the logic you used.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    11-17-2007
    Posts
    28

    Re: Frequency of associated numbers in a table

    Quote Originally Posted by shg View Post
    Looks to me that the table at the top IS the table you describe. If not, please complete a portion of the lower table manually and explain the logic you used.
    Yes, the table at the bottom is the data table, i put some examples in the top table, the frequency table, I want to populate the top table;

    each cell will contain the number of times the numbers in column A appear in the rows of the data table with the numbers in row 6 of the top table.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Frequency of associated numbers in a table

    OK, but then the first two rows of the lower table are not consistent with the first two rows of the upper table. Or if they are, please explain how.

  5. #5
    Registered User
    Join Date
    11-17-2007
    Posts
    28

    Re: Frequency of associated numbers in a table

    Quote Originally Posted by shg View Post
    OK, but then the first two rows of the lower table are not consistent with the first two rows of the upper table. Or if they are, please explain how.
    row 8 in the upper table, cell A2 = 2, looking at the data table below, the number 2 appears with the values in row 6 along the top of the upper table that many times, the value of A7=1 it appears 0 times with the value of B6(1), 1 time with the value of C6(2), 0 times with the value of D6(3), 0 times with the value of E6(4), 0 times with the value of F6(5), 0 times with the value of G6(6) and 1 time with the value of H6(7)

    The upper table is the frequency in which each number in column A appears with each number in row 6 in the lower table, the data table, the frequency table is looking at the data table to determine the number of times the combination of column A and row 6 numbers appear together. I did not put all the available numbers to compare in the frequency table column A and row 6, the numbers 1-7 are there for example purposes.
    Last edited by telcotech; 03-08-2009 at 03:18 PM.

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Frequency of associated numbers in a table

    I assume that each number can only appear a maximum of once per row

    There might be an easier way but......

    You can use this formula in B7 copied across and down

    =IF(B$6=$A7,"",SUM(IF(FREQUENCY(IF($B$16:$G$22=B$6,ROW($A$16:$A$22)-ROW($A$16)+1),ROW(INDIRECT("1:"&ROWS($B$16:$G$22))))+FREQUENCY(IF($B$16:$G$22=$A7,ROW($A$16:$A$22)-ROW($A$16)+1),ROW(INDIRECT("1:"&ROWS($B$16:$G$22))))=2,1)))

    This is an "array formula" that needs to be confirmed with CTRL+SHIFT+ENTER so that curly braces appear around the formula in the formula bar, see attached.

    I custom formatted the upper table as

    0;;

    which means that zeroes won't display
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-17-2007
    Posts
    28

    Re: Frequency of associated numbers in a table

    Thanks!! Daddy...

    Works like a charm.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1