+ Reply to Thread
Results 1 to 6 of 6

Counting Non Blanks & Blanks Records

  1. #1
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Counting Non Blanks & Blanks Records

    Hi All,

    I have an data in a columns. Here I need to count the non-blanks and blank records. Please find the attachment file.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Counting Non Blanks & Blanks Records

    Try:

    Please Login or Register  to view this content.
    Assumes you'll have more than two characters. Note: the blank cells in your sample contains spaces.

  3. #3
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Counting Non Blanks & Blanks Records

    Is it possible to modify the code to get the counts like attachment.

  4. #4
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Counting Non Blanks & Blanks Records

    Is it possible to modify the code to get the results like attachment.
    Attached Files Attached Files

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Counting Non Blanks & Blanks Records

    Hello sathishkm,

    You really don't need a VBA macro for this. It can be done easily with Formulas.

    Call B2 Formula: =IF(OR(A2=" ", A2=""), 0,1)

    Cell B3 Formula: =IF(OR(A3= " ", A3 =""),0, B2+1)

    Note: Cell B3 formula can be dragged down as far as needed in the column.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Counting Non Blanks & Blanks Records

    Modified:

    Please Login or Register  to view this content.

+ 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. Replies: 8
    Last Post: 06-15-2016, 09:53 AM
  2. Replies: 1
    Last Post: 07-23-2012, 12:50 AM
  3. Counting non blanks
    By khalid79m in forum Excel General
    Replies: 2
    Last Post: 07-12-2007, 09:16 AM
  4. Delete Rows - Blanks & Header Records
    By Harlequin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-11-2007, 08:49 PM
  5. [SOLVED] Paste Special Skip Blanks not skipping blanks, but overwriting...
    By gsrosin in forum Excel General
    Replies: 0
    Last Post: 02-22-2005, 12:06 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