Hi Lavanya

Use CountA function to solve your problem.

Assuming the data and formulas as below:

A     B    C     D      E     F     G      H     I
1     2     3     4                                    =COUNTA
(A1:H1)            Result would be 4
X     M     N    12     32   za                   =COUNTA
(A2:H2)            Result would be 6
A     1     1     N        X   Y      Z            =COUNTA
(A3:H3)            Result would be 7
PO  MN                                              =COUNTA
(A4:H4)            Result would be 2

.
.
.
.
.
For more tips, tricks, downloads and problem solutions: visit -->
http://www.excelitems.com
------------------------------------------------------------------------
Regards
*Ashish **Jain*
Analyst, CSC Australia
Microsoft Certified Application (Excel) Specialist
Technical Trainer - Excel and VBA
Author -> www.excelitems.com
+91-9999-40-48-43
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
On Mar 25, 2:58 pm, xxx <[email protected]> wrote:
> Hi all,
> I need some help since i an beginner in vba programming
> I have say an excel table as below:
>
> 1 2 3 4 5
> 2 3 4 5 6 6 78 8 9
> hdg dg gdh gj
> fsf
> sf sfs sfs sf
>
> in this table I have to count number of occupied cells in every row
>
> in first row the result should be 5
> In second row: 9
> third row:  4
> fourth row : 1
> and in fifth : 4
>
> Thank you for any help
--~--~---------~--~----~------------~-------~--~----~
-------------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to [email protected]
If you find any spam message in the group, please send an email to:
Ayush Jain  @ [email protected] or
Ashish Jain @ [email protected]
-------------------------------------------------------------------------------------
-~----------~----~----~----~------~----~------~--~---

Reply via email to