#1
|
|||
|
|||
Trying to count the lines in a grouping
Hi all
I am trying to find a formula that would get a count of the amount of lines in a particular group. Please see the example attached. I would like column "B" to be a formula that does the count. Any assistance would be greatly appreciated. |
#2
|
|||
|
|||
Code:
=count(b:b) |
#3
|
|||
|
|||
Thanks Logit. But, unfortunately, that doesn't work.
|
#4
|
|||
|
|||
Actually, I may have spoken incorrectly about what I was trying to do. Column B is not populated, I want that column to be populated with a formula that will then populate the field the way it looks in the example. For instance, Group 111 has 4 lines, I want column B to count those rows but not as a total. Line one of that group should be 1, line 2 of that group should be 2 etc. Then the count starts at 1 again when there is a new group. I hope that helps.
|
#5
|
|||
|
|||
How about
=COUNTIFS($A$2:A2,A2) |
#6
|
|||
|
|||
Thanks Purfleet, I kind of worked, but it didn't restart the count once a new group began.
|
#7
|
|||
|
|||
My sincerest apologies Purfleet. The formulas worked perfectly. I typed it in incorrectly. Thanks again for your help.
|
#8
|
|||
|
|||
no problem
|
#9
|
|||
|
|||
ugghhh...The document I am working on has over 75k lines. When I said it worked perfectly I had not checked further down the list. Further down the list for some strange reason the formula stopped working and I am not sure why.
|
#10
|
|||
|
|||
Can you upload the workbook?
|
#11
|
|||
|
|||
Unfortunately I cannot. It would violate HIPPA
|
#12
|
|||
|
|||
an example? It doesnt have to be the proper data
I cant see why it wouldnt work |
#13
|
|||
|
|||
I attached a sample of what I am doing. It seemed to be working until it got to line 138. It would correct itself and work for more lines than go off again. See the following lines:
152 156 304 358 364 368 548-551 742-743 4374-4397 |
#14
|
|||
|
|||
the count should actually be in coordination with the TRUTH/FALSE column. The TRUTH/FALSE determines when the next group starts.
|
#15
|
|||
|
|||
It is becuase of the size of the number - excel can only deal with (i think) 15 significant figures and anything else is rounded.
For exmaple if you put 377540323190869743517.9993055556+0 in an other cell it will show as 3.7754e+20, then increase decimals to the max and you will see the cell is actually showing 3.775403231908690000000e+20.. Drop off the zeros and filter for 377540323190869 and you will get 16, which is how many the count is counting. Now to get around that....... |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Grouping Lines by Project number on a separate page | taholmes160 | Excel | 2 | 04-17-2019 03:57 AM |
How to count words in a text, arrange them in separate lines and put the grammar class ? | Marcway | Word | 6 | 12-14-2018 04:25 PM |
Trying to add space between lines of bulleted text and a new header but both lines are moving??? | Martin_d35 | Word | 2 | 02-10-2017 07:13 AM |
Getting the Count formula to count all rows | Jennifer Murphy | Word Tables | 11 | 08-23-2016 09:37 PM |
Pivot table grouping problem 2 tables need different grouping | differentdrummer | Excel | 3 | 12-10-2013 01:19 AM |