Oct 10 2018 10:51 AM
Oct 10 2018 10:51 AM
Company 402 has 5 lines before Company 421. Want to enter the line count either in formula or Macro. Any help would be appreciated.
Count | ||
1 | Company Number: 402 | 5 |
ABC MANUFACTURING CO., INC. | 5 | |
1 JONES RD SE | 5 | |
ATLANTA GA 30315 | 5 | |
Yes | 5 | |
1 | Company Number: 421 | 6 |
JAMES, LLC | 6 | |
1 SWITZ | 6 | |
ST LOUIS MO 63147 | 6 | |
555/555-5555 | 6 | |
No active products | 6 | |
1 | Company Number: 464 | 8 |
THE Company | 8 | |
1821 LARKIN | 8 | |
MIDLAND MI | 8 | |
555/555-5555 | 8 | |
Yes | 8 | |
No active | 8 | |
8 | ||
1 | Company Number: 402 | 5 |
DEF MANUFACTURING CO., INC. | 5 | |
1 JONES RD SE | 5 | |
ATLANTA GA 30315 | 5 | |
Yes | 5 | |
1 | Company Number: 402 |
Oct 10 2018 11:46 AM
Hi Matt,
Starting from C3
=IF(ISBLANK(A3),C2+1,1)
and attached
Oct 10 2018 12:50 PM
Can I get the count cells to all be the total number of cells counted? instead of 1-5 it puts 5 in all of them, or 6 depending on how many rows are counted?
Oct 10 2018 01:21 PM
Matt,
formula for helper column D:
=IF(A2,SUM(D1,1),D1)
Formula for column B:
=COUNTIFS($D$2:$D$41,D2)
Oct 10 2018 01:55 PM
or
=IF(ISBLANK(A2),C1,IFNA(MATCH(FALSE,ISBLANK(OFFSET(A2,1,0,2000)),0),COUNTA(B2:B2000)))
but it depends on how the list of companies ended. Here I assume there are only blank cells after it.