Jump to content
Sign in to follow this  
newcoder1010

How to count total number of rows in a excel column

Recommended Posts

Set ExcelObj = createobject("excel.application")
ExcelObj.Visible = true
Set ExcelConfigFile = ExcelObj.Workbooks.Open (Path)
Set Sheet = ExcelConfigFile.Worksheets("Scripts")
TotalRow = Sheet.UsedRange.Rows.Count

Hello,

So far, I get total number of row of the sheet. I have a column called "key". How can I count total number of rows in the key column?

Thanks.

Share this post


Link to post
Share on other sites

Is that different from the rows in the sheet?  Look at the documentation for that object you're using, and see what properties and methods are available.  I assume instead of the UsedRange property you'll want to use a different one, maybe even define your own range.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×