Frequency of a number
Hello, I would like to know how often one nr appears along with another.
Best regards
Leo
Frequency of a number
Hello, I would like to know how often one nr appears along with another.
Best regards
Leo
Hello Leo,
Put this formula in B3 and drag it down to B53...
=COUNTIF($C$3:$V$11,A3)
Sincerely,
Leith Ross
"1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG"
... and if you wish to show the "x" then use a custom number format of: 0"x"
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Thankful for the attention, but what I wanted to do is that when the number 3 that I used as an example (B1) appears in a line how many times it coincides with the other numbers. In the example I used the 7 that appears 2 times.
In B3 and copy down
=freq(A3,$B$1,$C$4:$V$11)
In standard module
Function Freq(x, y, data) Dim Rw As Range, a As Long For Each Rw In data.Rows a = a + (Not Rw.Find(x, lookat:=xlWhole) Is Nothing) * (Not Rw.Find(y, lookat:=xlWhole) Is Nothing) Next If x = y Then Freq = "#N/A" Else Freq = a End If End Function
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Grateful for the attention, that's what I needed.