Flag Column if Matches 1 record

smusayev

New Member
Joined
Apr 9, 2018
Messages
3
Hello,

I have a table of Visit information for various customers.
I need to identify what we consider as our customer, which means that if the customer visited our store (Store1)
In the Table below I need to get the column OurCustomer

[TABLE="width: 500"]
<tbody>[TR]
[TD]Customer ID[/TD]
[TD]Store[/TD]
[TD]Visit Date[/TD]
[TD]Store1[/TD]
[TD]OurCustomer[/TD]
[/TR]
[TR]
[TD]Jon1[/TD]
[TD]Store1[/TD]
[TD]4/1/2018[/TD]
[TD]Y[/TD]
[TD]Y[/TD]
[/TR]
[TR]
[TD]Jon1[/TD]
[TD]Store2[/TD]
[TD]3/26/2018[/TD]
[TD]N[/TD]
[TD]Y[/TD]
[/TR]
[TR]
[TD]Jon1[/TD]
[TD]Store2[/TD]
[TD]11/20/2017[/TD]
[TD]N[/TD]
[TD]Y[/TD]
[/TR]
[TR]
[TD]Doe1[/TD]
[TD]Store2[/TD]
[TD]3/15/2018[/TD]
[TD]N[/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD]Doe1[/TD]
[TD]Store2[/TD]
[TD]2/10/2017[/TD]
[TD]N[/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD]Jane1[/TD]
[TD]Store1[/TD]
[TD]2/10/2018[/TD]
[TD]Y[/TD]
[TD]Y[/TD]
[/TR]
[TR]
[TD]Jane1[/TD]
[TD]Store1[/TD]
[TD]3/20/2015[/TD]
[TD]Y[/TD]
[TD]Y[/TD]
[/TR]
</tbody>[/TABLE]

Please help how I can achieve the above result.

I am a newbie in excel and working with excel 2010.

Thank you
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Welcome to the Board!

Let's say that the data table you posted above is in cells A1:D8, where row one is your headers.
Then place this formula in cell E2 and copy down for all rows:
Code:
=IF(COUNTIFS(A$2:A$8,A2,D$2:D$8,"Y")>0,"Y","N")
This returns that values you are showing in bold.
 
Upvote 0
Welcome to the Board!

Let's say that the data table you posted above is in cells A1:D8, where row one is your headers.
Then place this formula in cell E2 and copy down for all rows:
Code:
=IF(COUNTIFS(A$2:A$8,A2,D$2:D$8,"Y")>0,"Y","N")
This returns that values you are showing in bold.

Thank you it worked
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top