![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
|
if i set a range by currentregion
how do i get the for statement to go through each cell address in the range till it finds what its after? |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
Sub Tester() Dim MyRg As Range Dim oCell As Range 'Note D8 is the Top left cell 'of the current region you want Set MyRg = Range("D8").CurrentRegion For Each oCell In MyRg MsgBox oCell & oCell.Address Next End Sub |
|
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
|
Thanks Ivan
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|