+ Reply to Thread
Results 1 to 4 of 4

Counting rows until a blank row

  1. #1
    Registered User
    Join Date
    12-29-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    2

    Counting rows until a blank row

    Hi
    I want to be able to count the number of rows until I hit a blank row, and use the counter as an index. How is that possible?
    I have a no. of rows that are fulled, followed by a blank row then another set of rows that are filled then a blank row etc. I want to count the rows filled till the blank row and set the counter to that number. Then I want to do the same with the next set of rows etc.
    Any solution will be appreciated
    TIA
    Steve

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Counting rows until a blank row

    if you want consecutive numbers until a blank cell, then start again numbering after the blank, try this in a helper column. Assuming your data starts in A1, put this in B2, copied down...
    =IF(A2="",0,1+B1)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    12-29-2012
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Counting rows until a blank row

    Thanks for your reply. I do not want consecutive numbers until a blank cell, what i want is the total row count returned in a cell. The row count no. of rows till a blank row. for example if i have 18 rows filled up with data and the 19th is blank, then my cell counter should have the number 18 in it.
    thanks

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: Counting rows until a blank row

    How about...

    Please Login or Register  to view this content.
    ...where you data is in column A down to row 18, row 19 is blank and then row 20 starts up again with data
    HTH
    Regards, Jeff

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1