Excel Question

kparadise

Board Regular
Joined
Aug 13, 2015
Messages
186
Hello,

I have a data set; with CUST_IDs, a Date, and a formulated column (along with other columns I need to include in the results, but do not need to mention).

This data set contains duplicate CUST_IDs because that formulated column is different. What I am asking excel to do is to say, IF CUST_ID = another CUST_ID, AND IF each DATE = DATE; then tell me whether or not either of those two rows has a certain value in the formulated column.

[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]CUST_ID
[/TD]
[TD]DATE
[/TD]
[TD]NAME
[/TD]
[TD]INSERT1
[/TD]
[TD]INSERT2
[/TD]
[TD]FORMULATED
[/TD]
[TD]Results
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]12345
[/TD]
[TD]1/1/17
[/TD]
[TD]Matt
[/TD]
[TD]ABC
[/TD]
[TD]ABCE
[/TD]
[TD]PNC456
[/TD]
[TD]Y
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]12345
[/TD]
[TD]1/1/17
[/TD]
[TD]Mike
[/TD]
[TD]ABCD
[/TD]
[TD]DEFG
[/TD]
[TD]No PNC
[/TD]
[TD]Y
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]2345
[/TD]
[TD]2/1/17
[/TD]
[TD]Kyle
[/TD]
[TD]ABC
[/TD]
[TD][/TD]
[TD]PNC123
[/TD]
[TD]Y
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]3456
[/TD]
[TD]2/1/17
[/TD]
[TD]Leo
[/TD]
[TD]DEF
[/TD]
[TD]THGY
[/TD]
[TD]No PNC
[/TD]
[TD]N
[/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]12345
[/TD]
[TD]1/1/17
[/TD]
[TD]Matt
[/TD]
[TD]ABC
[/TD]
[TD][/TD]
[TD]PNC421
[/TD]
[TD]Y
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]9876
[/TD]
[TD]3/1/17
[/TD]
[TD]Jill
[/TD]
[TD]HJKL
[/TD]
[TD]FGHJ
[/TD]
[TD]No PNC
[/TD]
[TD]N
[/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]8765
[/TD]
[TD]4/1/17
[/TD]
[TD]Sam
[/TD]
[TD]GHJK
[/TD]
[TD][/TD]
[TD]PNC789
[/TD]
[TD]Y
[/TD]
[/TR]
</tbody>[/TABLE]

Here is my best attempt at creating the data set. Column A [CUST_ID] is not sorted, so the formula has to look within the whole column and find every instance where the CUST_ID matches. Then it needs to look in Column B [DATE] to see if the DATE also matched. If the CUST_ID and the DATE match for any (or multiple) record within the data set...Then it will look in Column F [FORMULATED] to see if any of those records start with 'PNC'. If any of the matching records start with 'PNC' put a Y in Column G [RESULTS] - for all the matching records.

Also, if CUST_ID & DATE does not match to any other CUST_ID & DATE ... I still want to look in Column F [FORMULATED] and see if that value starts with 'PNC' to put a Y in the results.
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Also, if CUST_ID & DATE does not match to any other CUST_ID & DATE ... I still want to look in Column F [FORMULATED] and see if that value starts with 'PNC' to put a Y in the results.

So why are you checking the customer stuff at all?? You just need to check column F dont you?
 
Upvote 0
Because it is possible for the same CUST_ID to have multiple records in the data set. The Same CUST_ID can have the same DATE or multiple DATE as well. The Same CUST_ID can also have the same or multiple FORMULATED values.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

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