ISERROR for Multiple Workbooks

  • Thread starter Thread starter TenacityWins
  • Start date Start date
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.
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top