I know you asked for a macro, but is it absolutely necessary?? A formula is
easier. In E2 enter
=IF(SUMPRODUCT(--(C$2:C$6=C2),--(D$2

$6=D2))>1,"X","")
and copy/fill down.
If you don't want to flag the first occurence (only the subsequent ones) then
=IF(SUMPRODUCT(--(C$2:C2=C2),--(D$2

2=D2))>1,"X","")
"(E-Mail Removed)" wrote:
> Hi Everyone,
> I have the following data in columns A B C D
> Vendor Name Invoice Date Invoice Number Employee Name
>
> D & D 1/17/2002 3464043201
> Flight,, William
> D & D 1/17/2002 3464043201
> Sunningham,, L Jean
> D & D 1/17/2002 3464043201
> Flight,, William
> D & D 1/17/2002 3464043202
> Barrar,, Netty R
> D & D 1/17/2002 3464043202
> Barrar,, Netty R
>
>
> I want to look at column c (invoice number) then search thru column c
> for each invoice number and compare it with column d. If there is more
> than one name associated with each invoice number in column c I want
> to indicate it with an x in new column e.
> In the example above Flight,, William & Barrar,, Netty R will have
> an a x in new column e
>
>
> I would like a macro to do this as this spreadsheet has 5000 rows in
> it
>
> Thanks in advance for the groups guidance.
>
>