Ok I am trying! Not a coder. Is it possible in the code to automatically parse the 0-64 in the code instead of ymin and ymax? This way I can automatically just pull down.
Currently looks like this!
Frequency Values
=items(0,64,$A$1:$A$25,", ")
=items(65,71,$A$1:$A$25,", ")
=items(73,82,$A$1:$A$25,", ")
=items(83,90,$A$1:$A$25,", ")
=items(91,100,$A$1:$A$25,", ")
Question 2 - How do I get that last comma out of there i.e. 37, 57, 62, 64,
Thanks in advance Stephen
Code:
Public Function items(ymin As Integer, ymax As Integer, r As Range, Optional seperator As String)
Dim i As Long
Dim j As Long
Dim ret As String
Dim rr As Range
For Each rr In r
If rr.Value >= ymin And rr.Value<= ymax Then
ret = ret & rr.Value & seperator
End If
Next
items = ret
End Function
VBA Function to Bring back the Frequency Values in On Cell.xlsm |
---|
|
---|
| A | B | C | D | E |
---|
1 | 37 | | | | Frequency Values |
---|
2 | 57 | | 0-64 | 4 | 37, 57, 62, 64, |
---|
3 | 62 | | 65-71 | 1 | 71, |
---|
4 | 64 | | 73-82 | 7 | 75, 77, 78, 78, 78, 79, 82, |
---|
5 | 71 | | 83-90 | 8 | 87, 88, 88, 88, 88, 89, 89, 89, |
---|
6 | 75 | | 91-100 | 5 | 92, 93, 94, 100, 100, |
---|
7 | 77 | | | | |
---|
8 | 78 | | | | |
---|
9 | 78 | | | | |
---|
10 | 78 | | | | |
---|
11 | 79 | | | | |
---|
12 | 82 | | | | |
---|
13 | 87 | | | | |
---|
14 | 88 | | | | |
---|
15 | 88 | | | | |
---|
16 | 88 | | | | |
---|
17 | 88 | | | | |
---|
18 | 89 | | | | |
---|
19 | 89 | | | | |
---|
20 | 89 | | | | |
---|
21 | 92 | | | | |
---|
22 | 93 | | | | |
---|
23 | 94 | | | | |
---|
24 | 100 | | | | |
---|
25 | 100 | | | | |
---|
|
---|