For the benefit of anyone searching for similar, see worksheet .UsedRange
,
e.g. ? ActiveSheet.UsedRange.Rows.Count
and loops such as
For Each loopRow in Sheets(1).UsedRange.Rows: Print loopRow.Row: Next
More Related Contents:
- SumIf using Excel VBA
- How can I call a macro which contains a loop but only run one iteration of that loop?
- Test or check if sheet exists
- Copy from one workbook and paste into another
- How to copy Outlook mail message into excel using VBA or Macros
- For Loop not fully cycling in excel VBA [duplicate]
- Unique Random Numbers using VBA
- Populate unique values into a VBA array from Excel
- Excel VBA App stops spontaneously with message “Code execution has been halted”
- How to remove all non alphanumeric characters from a string except period and space in excel?
- Closing Excel Application using VBA
- How to clear memory to prevent “out of memory error” in excel vba?
- Delete Row based on Search Key VBA
- Export each sheet to a separate csv file
- Detect if range is empty
- Checking if a worksheet-based checkbox is checked
- Faster way to remove ‘extra’ spaces (more than 1) from a large range of cells using VBA for Excel
- Uncheck all checkboxes across entire workbook via CommandButton
- VBA workbooks.Close without being prompted to if the user wants to save?
- Extract Data from Word Document to an Excel SpreadSheet
- VBA equivalent to Excel’s mod function
- Excel macro – paste only non empty cells from one sheet to another
- Pointers needed for speeding up nested loop macro in VBA
- ‘1004’: “The sort reference is not valid.”
- Select entire column in table using Excel VBA
- Create hyperlink to another sheet
- Reducing WithEvent declarations and subs with VBA and ActiveX
- Convert Early Binding VBA to Late Binding VBA : Excel to Outlook Contacts
- How to highlight selected text within excel
- How to fix a VBA “type mismatch” error after switching to 64-bit Excel