difficult formula help

drobbins3006

New Member
Joined
May 24, 2011
Messages
7
sheet 1 contains
column a = list of numbers
column b may or may not be populated
column c = one of these values: Empty, ThisList, CreditList, or Unique.

sheet 2 contains
column a = list of numbers

if b1 is unpopulated c1= "Empty" regardless of what is in a1

if a1 is duplicated in column a, and b1 is populated, c1 = "ThisList"

if a1 is found in sheet 2 column a, and b1 is populated, c1 = "CreditList"

if a1 is unique in column a, not found in sheet 2 column a, and b1 is populated, c1 = "Unique"

I have tried to figure out a formula, but will use any solution available.

Thanks to anyone who is willing to help.
 
Could be a problem with whole columns not being allowed by Excel 2002. Maybe you could try:

=IF(LEN(B1)>0,IF(COUNTIF($A$1:$A$1000,A1)>1,"ThisList",IF(COUNTIF(Sheet2!$A$1:$A$1000,A1)>=1,"CreditList","Unique")),"Empty")

Change 1000 to however many rows you like.
 
Upvote 0

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Works great. Thank you very much.

If possible, I would like for the first or lasr occurance in sheet 1 column a to not show as "ThisList".

You have been very helpfull and this will serve my purpose until/if you can help.
 
Upvote 0
Hey there. This may work:

=IF(LEN(B1)>0,IF(AND(COUNTIF($A$1:$A$1000,A1)>1,NOT(OR(MATCH(A1,$A$1:$A$1000,0)=ROW(),MAX(ROW($A$1:$A$1000)*($A$1:$A$1000=A1))=ROW()))),"ThisList",IF(COUNTIF(Sheet2!$A$1:$A$1000,A1)>=1,"CreditList","Unique")),"Empty")

It'll have to be entered using Ctrl+Shift+Enter, instead of just Enter. Then it can be copied and pasted down the remaining cells of Column C.

It might be more convenient to give a name to your Column A range. For example, you could name the range $A$1:$A$1000 as "MyRange". Then your formula would become:

=IF(LEN(B1)>0,IF(AND(COUNTIF(MyRange,A1)>1,NOT(OR(MATCH(A1,MyRange,0)=ROW(),MAX(ROW(MyRange)*(MyRange=A1))=ROW()))),"ThisList",IF(COUNTIF(Sheet2!$A$1:$A$1000,A1)>=1,"CreditList","Unique")),"Empty")

Again, this would be entered using Ctrl+Shift+Enter.
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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