+ Reply to Thread
Results 1 to 6 of 6

Counting Blank lines till the End of the Column

  1. #1
    Registered User
    Join Date
    06-22-2015
    Location
    lisbon
    MS-Off Ver
    windows 8
    Posts
    33

    Counting Blank lines till the End of the Column

    Hi,

    Let's say I have a column with only a's.

    a
    a
    a

    a


    a

    For example last "a" is on the 10th line of excel (but the last row could be 20th or whatever). How do I count the blankspaces till the last non blank cell. In this case the result would be 4 blank cells.

    Thank you very much

  2. #2
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    606

    Re: Counting Blank lines till the End of the Column

    Try this:-

    Please Login or Register  to view this content.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2506 Win 11
    Posts
    24,788

    Re: Counting Blank lines till the End of the Column

    Here is a VBA solution:

    Please Login or Register  to view this content.
    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Contributor
    Join Date
    12-16-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: Counting Blank lines till the End of the Column


    http://www.easyexcelanswers.com

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,661

    Re: Counting Blank lines till the End of the Column

    Or:

    =COUNTBLANK(A1:INDEX(A:A,MATCH("a",A:A,1),))
    Quang PT

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Counting Blank lines till the End of the Column

    Maybe this will work for you
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] repeat counting of blank cells till a cell with number/text
    By joshcct in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-03-2015, 03:33 AM
  2. How to find difference of two columns till blank space in column B
    By aleanboy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-11-2014, 04:11 PM
  3. [SOLVED] Select column C and delete blank entire rows Till C300
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2014, 08:55 AM
  4. Counting text in between Months in a column till next blank cell
    By sapell in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-13-2014, 04:41 PM
  5. [SOLVED] I need a macro to copy down till adjacent column ends in a blank cell
    By Paul Hayward in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-09-2014, 02:27 PM
  6. copy column and it's row value till column blank found
    By nareshkt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-23-2013, 03:20 AM
  7. Select a specific column till it identifies blank cell and to format
    By k1234y in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-28-2012, 12:35 AM

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