Help with Excel macro?

V

Victor Delta

I have a spreadsheet which lists clients' names in Column A. When I add a
new on at the bottom, I need to quickly check that the name is not an
existing customer i.e. already on the list above.

I have tried to record a macro which copies the selected cell, and then
tries to find any other entries with the same name on the sheet (using the
Find... function on the edit menu) but the macro only seems to record the
'copy' command and nothing after that.

Does anyone know how to get round this please?

TIA

V
 
T

TomPl

Well, what I would do is use conditional formatting.

Select the entire column A.
Then go to the menu <Format><Conditional Formatting>
Change the dropdown from "Cell Value Is" to "Formula Is>
Enter "=COUNTIF($A:$A,A1)>1" without the quotes
change the format to highlight Red
<OK>

Now, if you enter a duplicate name the cell will turn red.

Tom
 
V

Victor Delta

TomPl said:
Well, what I would do is use conditional formatting.

Select the entire column A.
Then go to the menu <Format><Conditional Formatting>
Change the dropdown from "Cell Value Is" to "Formula Is>
Enter "=COUNTIF($A:$A,A1)>1" without the quotes
change the format to highlight Red
<OK>

Now, if you enter a duplicate name the cell will turn red.

Tom

Tom

Good idea - many thanks!

V
 

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