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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...