• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Count of Columns and record counts at each column via Macro

Kamalakar

New Member
Hi,


i am looking for an option via macro to check two things :

1. Get the Column count in an excel sheet

2. Get the rows count at each column in the same excel sheet.

e.g

EmpID Name Salary Dept

100 Kamal 1000 IS

200 Balaji 2000 MFG

300 Ganesh 3000 WI

400 Varun 4000 WT


considering this is the data available in an excel sheet , a macro should give me the following output :


Total Columns count : 4

Empid : 4

Name : 4

Salary :4

Dept : 4


this check i do regularly for a huge excel sheet . if a macro is available then i check quickly and check on the expected counts at Columns and each column counts.


regards,

Kamal M.


Regards,

---------------------------------------------

Kamal M.
 
Hi, Kamalakar!


It can be done without macros too, using functions COUNT, COUNTA, COUNTIF, ...

Have you tried them? If not I suggest you to give a look at them, type in an empty cell:

=COUNT(

and press the "f(x)" symbol at the left of the edit bar to access the built-in help. Then repeat for the other functions.


After that, please confirm if you still need macros for doing so.


Regards!
 
Back
Top