How to error trap "... cannot find the data..." message?

  • Thread starter Thread starter tclim36
  • Start date Start date
T

tclim36

MyList has has several columns showing the stock codes, their closing
prices, etc. The macro program I use runs down MyList and checks off
the codes line by line against the ExchangeList. If the codes are
found, indicating there were trading for them, it then updates the
data on MYList. When there was no trading for a particular stock,
Excel prompts me with the message: "Excel could not find the data you
are searching for". At that stage I have to press the Enter Key to
clear the OK sign and allow the program to continue on to search for
the next code till the end. There were days when I had to press the
Enter Key over a hundred times. Is there a way for the program to do
this automatically by adding some codes to it? Thanks for any help.

Tom
 
Could be as simple as adding
Application.DisplayAlerts = False

or
Application.DisplayAlerts = False
On Error Resume Next

before the .Find line in your code.

Would help more to see the macro code you're using.
 
I think that the program will have to be changed.

If you're not the developer, maybe you can ask for the results to be placed in
an adjacent column--or even have a new results worksheet created.
 
Could be as simple as adding
Application.DisplayAlerts = False

or
Application.DisplayAlerts = False
OnErrorResume Next

before the .Find line in your code.

Would help more to see the macro code you're using.

Sorry, couldn't get back earlier because of computer problem.
The codes below are written in Excel 4 macro. Hope they make sense.
=ACTIVATE("ExchangeList.xls")
=FORMULA.FIND("xyz",1,2,2,1,FALSE) - by column, match all, etc.
=IF(A156=FALSE,,GOTO(A160)) - if previous line's return is "false",
continue next line, else get its content.
=ACTIVATE("MyList".xls")
=SELECT("R[1]C") - move down 1 row, same column
=GET.CELL(5) - get content of activecell

Tom
 
I think that the program will have to be changed.

If you're not the developer, maybe you can ask for the results to be placed in
an adjacent column--or even have a new results worksheet created.

Thanks for your suggeation.

Tom
 
Back
Top