Help with Excel macro?

  • Thread starter Thread starter Victor Delta
  • Start date Start date
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
 
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
 
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
 
Back
Top