Hi Everyone, first time posting here.
So, I have a set of numbers ranging between 0.15 and 1.5, in 0.01 increments. What I'm trying to do is count the number of instances each number appears in the set (ex - how many times is 0.76 listed).
I've tried creating a frequency array using my data set and another column with the upper and lower banding values (so from .15 to 1.5 in 0.01 increments). The problem with this approach is that I'm getting a lot of zeros (ex. .36 might not appear in my data set, so the frequency array returns a value of zero for .36). These zeros are throwing off my analysis.
Is there any way to exclude/omit frequencies of zero from my analysis? Should I even be using a frequency array to solve this problem?
Thanks!
B
Sounds like you could use countif, as in =COUNTIF(A$1:A$1000,C1), where C1 has your table. To not include 0s, you can use, =IF(COUNTIF(A$1:A$1000,C1),COUNTIF(A$1:A$1000,C1),""). That will make the cells text, which will keep them from being counted in formulas like Average.
Life is about perseverance. Remember: today's mighty oak tree is just yesterday's nut that held its ground.
If you like a post, please rate it with the scales icon (top right).
If you feel really indebted, please consider a donation to charity, such as Feed the Children or Habitat for Humanity.
Welcome to the forum.
One way:
-A-- B -C-- -D-- -----------------------E----------------------- 1 Data Bin Freq 2 0.41 0.15 1 C2 and down: =SMALL($A$2:$A$101, SUM(D$1:D1)+1) 3 0.17 0.17 4 D2 and down: =COUNTIF($A$2:$A$101, C2) 4 0.54 0.18 2 5 0.28 0.20 1 6 0.47 0.21 1 7 1.13 0.22 1 8 1.39 0.27 1 9 0.31 0.28 1 10 0.15 0.31 1 11 1.15 0.33 1 12 0.79 0.35 2 13 0.97 0.36 1 14 0.27 0.38 1 15 1.06 0.39 2 16 1.29 0.41 3 17 0.97 18 1.44 19 0.70 20 0.52 21 0.60 22 0.22 23 0.88 24 1.30
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
Thanks for the suggestions, they make sense. Unfortunately, I'm having trouble getting the COUNTIF to work - it always returns a zero. I know this probably is a really basic issue, I just haven't used the function before.
Any help will be appreciated,
Thanks!
B
To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook. Don't upload a picture when you have a workbook. None of us is inclined to recreate your data. Upload the workbook and manually add an 'after' situation so that we can see what you expect. In addition clearly explain how you get the results.
To attach a file to your post, you need to be using the main 'New Post' or 'New Thread' page and not 'Quick Reply'.
To use the main 'New Post' page, click the 'Post Reply' button in the relevant thread.
On this page, below the message box, you will find a button labelled 'Manage Attachments'.
Clicking this button will open a new window for uploading attachments.
You can upload an attachment either from your computer or from another URL by using the appropriate box on this page.
Alternatively you can click the Attachment Icon to open this page.
To upload a file from your computer, click the 'Browse' button and locate the file.
To upload a file from another URL, enter the full URL for the file in the second box on this page.
Once you have completed one of the boxes, click 'Upload'.
Once the upload is completed the file name will appear below the input boxes in this window.
You can then close the window to return to the new post screen.
“To sin by silence when they should protest makes cowards of men.” ~ Abraham Lincoln
Hi, Again, thanks for the advice. I've uploaded a document to illustrate my problem.
B
Your data isn't as you described it.
--A-- -----B----- -C-- -----------------------D----------------------- 1 Value Bin Freq 2 0.17 0.071999997 1 B2 and down: =SMALL($A$2:$A$182, SUM(C$1:C1)+1) 3 0.68 0.119999997 1 C2 and down: =COUNTIF(A$2:A$182,B2) 4 0.48 0.143000007 44 5 0.41 0.169000000 5 6 0.29 0.239999995 8 7 0.14 0.289000005 7 8 0.68 0.338999987 10 9 0.34 0.358999997 9 10 0.58 0.409000009 7 11 0.14 0.458999991 21 12 0.63 0.479000002 19 13 0.34 0.508000016 15 14 0.48 0.527000010 1 15 0.14 0.528999984 1 16 0.14 0.544000030 1 17 0.14 0.578000009 10 18 0.60 0.598999977 12 19 0.46 0.628000021 2 20 0.51 0.677999973 3 21 0.24 0.698000014 1 22 0.14 0.718999982 2 23 0.48 0.838999987 1 24 0.48 25 0.46 26 0.14 27 0.14 28 0.58
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
I see now that my original description of the data was inaccurate - I believe my mistake was that the Excel cells were formatted to show only 2 decimal places, so I assumed that my bins only had to have 2 decimal places.
Sorry about the confusion,
B
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks