+ Reply to Thread
Results 1 to 10 of 10

How to Count blank Cells till last used row

  1. #1
    Registered User
    Join Date
    01-04-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    5

    Question How to Count blank Cells till last used row

    Hi There,

    I have been busy with VBA today and i'm making an overview of the resultcodes in a workbook, only the amount of rows vary each day.

    Is there a method to count the blank cells in a specific column to the last row instead of getting a number like 64,954?

    I need to display the amount of blank cells, i display the number in a different sheet then the data is in.

    The sheet with the data is called "DATATABLE" i now have Range("B40").Value = "=COUNTIF(DATATABEL!C[42],"""")" but this gives me every single blank cell until the end, i just need the blank cells till the last row.

    Thanks in advance!

    Gr. Bas
    Last edited by BDH-EXC; 01-04-2013 at 10:29 AM.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: How to Count blank Cells till last used row

    Try the following code. It assumes that your data is in column A starting in the second row and places the count in B1. You can make the changes to suit your situation.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-04-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: How to Count blank Cells till last used row

    Thnx Mumps1,

    I will try it right away!

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: How to Count blank Cells till last used row

    option, counting in A column
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-04-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: How to Count blank Cells till last used row

    Well the problem that i have now is that it fills the data in the worksheet it counts in. I need to count in 1 sheet and fill it in the other.

  6. #6
    Registered User
    Join Date
    01-04-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: How to Count blank Cells till last used row

    watersev, your way also counts the wrong sheet.

    I need to count the row's in the sheet "DATATABLE" and then put the data in the "STATUS" sheet.

    I have no clue what to do..

    Please Login or Register  to view this content.

  7. #7
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: How to Count blank Cells till last used row

    Change the line:

    Please Login or Register  to view this content.
    to:
    Please Login or Register  to view this content.

  8. #8
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: How to Count blank Cells till last used row

    Please Login or Register  to view this content.

  9. #9
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: How to Count blank Cells till last used row

    Try this:

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    01-04-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: How to Count blank Cells till last used row

    Thank you watersev, this line works like a charm!

    Mumps1, also thanks for the quick responses!

    You guys are the best!!

+ 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