Skip to content

Instantly share code, notes, and snippets.

@ndthanh
Created November 22, 2017 08:26
Show Gist options
  • Save ndthanh/1f9fe8dc6a240d816d1eaf6c5cf9c75d to your computer and use it in GitHub Desktop.
Save ndthanh/1f9fe8dc6a240d816d1eaf6c5cf9c75d to your computer and use it in GitHub Desktop.
jLastInRange = oSht.Range("NamedRange").Offset(oSht.Range("NamedRange").Rows.Count – 1, 0).Row
jLastInRegion = oSht.Range("NamedRange").CurrentRegion.Rows.Count + oSht.Range("NamedRange").Row – 1
jLastInTable = oSht.ListObjects("Table1").Range.Rows.Count + oSht.ListObjects("Table1").Range.Row – 1
jLastTableDataRow = oSht.ListObjects("Table1").ListRows.Count + oSht.ListObjects("Table1").Range.Row – 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment