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.
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.
Try:
Assumes you'll have more than two characters. Note: the blank cells in your sample contains spaces.![]()
Please Login or Register to view this content.
Is it possible to modify the code to get the counts like attachment.
Is it possible to modify the code to get the results like attachment.
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 Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Modified:
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks