Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I having brain issues...
I've completely forgotten how to trap an error in a loop Here is what I have (watch out for lines wrapping): Sub MapDependencies() Dim cell As Range For Each cell In ThisWorkbook.Sheets("Summary").Range("A1:L64") ThisWorkbook.Sheets("Dependencies").Range("b65000" ).End(xlUp).Offset(1, 0).Value = cell.DirectDependents.Address ThisWorkbook.Sheets("Dependencies").Range("b65000" ).End(xlUp).Offset(0, -1).Value = cell.Address Next cell End Sub Cell A1 has no dependencies, so error 1004 'No cells were found' pops up. I can trap the first error in the loop, but if any other subsequent cell errs then it is no longer trapped. Any ideas? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Technically, can anyone explain to me why Cells.Find() is so much faster than a loop? | Excel Programming | |||
Loop thru cells and find match | Excel Programming | |||
loop to find cells with specified value | Excel Programming | |||
Make a loop to Find a value then move a row of cells | Excel Programming | |||
Problem with cells.Find within a loop | Excel Programming |