ISERROR for Multiple Workbooks

T

TenacityWins

I may be trying to do the impossible. I want to use ISERROR to check
multiple open workbooks. If either workbook has information in specific
ranges/cells, I want that data returned, otherwise a "" response.
 
J

Joel

MyError = False
For Each Cell In A
If IsError(Cell) = True Then
MyError = True
Exit For
End If
Next Cell
If MyError = False Then
For Each Cell In B
If IsError(Cell) = True Then
MyError = True
Exit For
End If
Next Cell
End If
If MyError = True Then
MsgBox ("Found an Error")
End If
 
J

Joel

I lost two lines when posting my response

Set A = Workbooks("Book1.xls").Range("A1:D7")
Set B = Workbooks("Book2.xls").Range("A1:D7")

MyError = False
For Each Cell In A
If IsError(Cell) = True Then
MyError = True
Exit For
End If
Next Cell
If MyError = False Then
For Each Cell In B
If IsError(Cell) = True Then
MyError = True
Exit For
End If
Next Cell
End If
If MyError = True Then
MsgBox ("Found an Error")
End If
 
Top