Locate data macro

M

Malcolm McM

I have a list using unique coded ref numbers.
During the data entry process, if the unique code has already been entered,
I use this statement "=1=COUNTIF($A$5:$A$238,A7)" to warn the operator that
it has already been entered and to display the cell ref where it is located.
I would like to create a macro that will locate the record once the warning
is activated.
Any help would be appreciated.
 
J

JLatham

Formulas cannot call a macro, you could actually have a macro attached to the
worksheet_change() event to monitor a column or fixed range as your A5:A238
range and notify the user, clear the entry and select the cell the previous
entry is in.

Or would you prefer to call the macro 'manually' after the alert is put up?
In any case we need a little more information like: is A5:A238 always the
range to be examined for prior entry? Is A7 always then cell that they enter
a number into? If not, describe it all in a little more detail please.

Also, it's a little confusing that you're testing A7 within the range
A5:A238??
 
M

Malcolm McM

Manually call the macro after the alert is issued.
Yes the cells to be monitored for duplicates are always A5:A238.
The data is entered into the range A5:A238 and every line is monitored for
a dulpicate value as the data is entered.The operator begins entering data at
A5 & continues down the list. The objective is, if the operator is entering
data at say line 200 and the same code has been entered at say line 5 she
will get the message that the code has already been entered at line 5.I would
like to then have the macro delete the last duplicated value and return to
line 5 so data can be added to the adjacent columns.
Hope you can follow this,and thank you for helping.
 

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

Top