Sub LoopRange()
Dim rCell As Range
Dim rRng As Range
Set rRng = Sheet1.Range("A1:A6")
For Each rCell In rRng.Cells
Debug.Print rCell.Address, rCell.Value
Next rCell
End Sub
More Related Contents:
- How can I call a macro which contains a loop but only run one iteration of that loop?
- VBA comma separated cells, needt last entry only
- How can I find last row that contains data in a specific column?
- Open Excel file for reading with VBA without display
- Wait for shell command to complete [duplicate]
- Are there disadvantages in putting code into Userforms instead of modules?
- Difference between ‘on error goto 0’ and ‘on error goto -1’ — VBA
- What are .NumberFormat Options In Excel VBA?
- Excel: How to check if a cell is empty with VBA? [duplicate]
- ShowAllData method of Worksheet class failed
- Detect if range is empty
- Assign keyboard shortcut to run procedure
- Uncheck all checkboxes across entire workbook via CommandButton
- return csv file as recordset
- VBA workbooks.Close without being prompted to if the user wants to save?
- Excel macro -Split comma separated entries to new rows [duplicate]
- Get text from clipboard using GetText – avoid error on empty clipboard
- Copy a selected range to another worksheet
- Benchmarking VBA Code
- Excel macro – paste only non empty cells from one sheet to another
- The MacScript function is not working well in Office for Mac 2016! Any ideas?
- Display milliseconds in Excel
- VBA editor auto-deletes spaces at the ends of lines
- Application.Quit command not closing the entire Excel Application
- Create hyperlink to another sheet
- Trying to open the workbook in separate instance
- Convert Early Binding VBA to Late Binding VBA : Excel to Outlook Contacts
- Create folder path if does not exist (saving from VBA)
- How to highlight selected text within excel
- How to fix a VBA “type mismatch” error after switching to 64-bit Excel