![]() |
![]() |
|
|||||||
| 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 |
|
Board Regular
Join Date: Feb 2002
Posts: 117
|
Hi-
The formula: For Each c In Worksheets("1").range("I2:I100") Will search for a c value in sheet 1, range I2 to I100. Say if I have 12 sheets named 1 thruogh 12 and I want the c.value to search in each sheet,range I2 to I200. How would one adjust this code so that it searches all 12 sheets at once?? |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
Dim Sh As Worksheet For Each Sh In ActiveWorkbook.Sheets For Each c In Sh.Range("I2:I100") '// Next c Next Sh |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Posts: 117
|
Thanks Ivan, This works well!!
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|