ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Challenging Problem (https://www.excelbanter.com/excel-programming/391823-challenging-problem.html)

[email protected]

Challenging Problem
 
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.


JMB

Challenging Problem
 
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:D$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:D2=D2))1,"X","")


" 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.




All times are GMT +1. The time now is 09:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com