title: Count Excel Rows without Opening it
body: <p>I've found this Code </p>
  
  <pre><code>Sub test()
  Dim i As Integer
  Dim j As Integer
  Dim mypath As String
  Dim filename As String
  Dim shtname As String
  Dim m As Integer
  Dim myfile As Workbook
  
  With ThisWorkbook.ActiveSheet
  .Cells.ClearContents
  .Range("A1").Value = "filename"
  .Range("B1").Value = "sheet's name"
  .Range("C1").Value = "rows count"
  End With
  
  With Application.FileDialog(msoFileDialogFolderPicker)
  If .Show = False Then Exit Sub
  mypath = .SelectedItems(1) &amp; "\"
  End With
  
  filename = Dir(mypath &amp; "*.xls")
  Do While filename &lt;&gt; ""
  Workbooks.Open mypath &amp; filename
  i = ActiveWorkbook.Worksheets.Count
  m = ThisWorkbook.ActiveSheet.Cells(65536, 1).End(xlUp).Row
  For j = 1 To i
  With ThisWorkbook.ActiveSheet
  .Cells(m + j, 1).Value = filename
  .Cells(m + j, 2).Value = ActiveWorkbook.Worksheets(j).Name
  .Cells(m + j, 3).Value = ActiveWorkbook.Worksheets(j).Cells(1, 1).End(xlDown).Row
  End With
  Next j
  filename = Dir()
  Loop
  
  filename = Dir(mypath &amp; "*.csv")
  Do While filename &lt;&gt; ""
  Workbooks.Open mypath &amp; filename
  m = ThisWorkbook.ActiveSheet.Cells(65536, 1).End(xlUp).Row
  With ThisWorkbook.ActiveSheet
  .Cells(m + 1, 1).Value = filename
  .Cells(m + 1, 3).Value = ActiveWorkbook.ActiveSheet.Cells(1, 1).End(xlDown).Row
  End With
  filename = Dir()
  Loop
  
  For Each myfile In Workbooks
  If myfile.Name &lt;&gt; ThisWorkbook.Name Then
  myfile.Close False
  End If
  Next
  
  End Sub
  </code></pre>
  
  <p>from <a href="https://chandoo.org/forum/threads/how-to-count-the-number-of-rows-without-opening-an-excel-file.11887/" rel="nofollow noreferrer">chandoo.org</a> It counts Rows of Excel without opening it the only problem with this is that it count First Column but i want to count Column (PC) in my excel files
  So can any one modify this code to count Column (PC) instead of first Column using Excel Macro</p>
  
  <p>Thanks in Advance</p>