Require formula

Ron99

Active Member
Joined
Feb 10, 2010
Messages
340
Office Version
  1. 2016
Platform
  1. Windows
Hello,

From the below table I need a simple output.
There are ID's assigned to each item. If the item type and ID's are same the output should be 'TRUE" else "FALSE"

Example - ID 1000024 has all the same item type so the output should be "true" whereas ID 1000025 different item type it should be "FALSE"


IDITEM TYPEOUTPUT
1000024CONSUMABLE
1000024CONSUMABLE
1000024CONSUMABLE
1000024CONSUMABLE
1000024CONSUMABLE
1000025CONSUMABLE
1000025CONSUMABLE
1000025CONSUMABLE
1000025REPAIRABLE
1000025EXPENDABLE
1000025CONSUMABLE

<tbody>
</tbody>
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi,

Thank you for the reply. I used the formula but I would require a slight change

ID
ITEM TYPE
OUTPUT
1000024
CONSUMABLE
TRUE
1000024
CONSUMABLE
TRUE
1000024
CONSUMABLE
TRUE
1000024
CONSUMABLE
TRUE
1000024
CONSUMABLE
TRUE
1000025
CONSUMABLE
TRUE
1000025
CONSUMABLE
TRUE
1000025
CONSUMABLE
TRUE
1000025
REPAIRABLE
TRUE
1000025
EXPENDABLE
FALSE

1000025
CONSUMABLE


<tbody>
</tbody>


When There is false I want the entire ID to show up as "FALSE". In this case 1000025 should all show up as false.
 
Last edited:
Upvote 0
Ron99, Good morning.

Aladin Akyurek, Good morning. (Greetings from Brazil!)

Try this one:

=COUNTIFS($A$2:$A$20,A2,$B$2:$B$20,B2)=COUNTIF($A$2:$A$20,A2)

Please, tell us if it worked as you want.

I hope it helps.
 
Upvote 0
Hi,

Thank you for the reply. I used the formula but I would require a slight change
[...]
When There is false I want the entire ID to show up as "FALSE". In this case 1000025 should all show up as false.

If uniqueness is required and any blank in A or B should be treated differently...

Control+shift+enter, not just enter:

=IF(OR(A2="",B2=""),"",1=SUM(IF(FREQUENCY(IF($A$2:$A$12=A2,MATCH("~"&$B$2:$B$12,$B$2:$B$12&"",0)),ROW($B$2:$B$12)-ROW($B$2)+1),1)))
 
Upvote 0
Thank you guys, there are no blanks.
Going by the formula "=COUNTIFS($A$2:$A$12,A2,$B$2:$B$12,B2)>1 " output will be


ID
ITEM TYPE
formula
EXPECTED OUTPUT
1000024
CONSUMABLE
TRUE
TRUE
1000024
CONSUMABLE
TRUE
TRUE
1000024
CONSUMABLE
TRUE
TRUE
1000024
CONSUMABLE
TRUE
TRUE
1000024
CONSUMABLE
TRUE
TRUE
1000025
CONSUMABLE
TRUE
FALSE
1000025
CONSUMABLE
TRUE
FALSE
1000025
CONSUMABLE
TRUE
FALSE
1000025
REPAIRBALE
TRUE
FALSE
1000025
EXPENDABLE
FALSE
FALSE
1000025
REPAIRBALE
TRUE
FALSE

<tbody>
</tbody>


If all item type are same then its TRUE, IF any one item type is different all should be false to that particular ID.
 
Last edited:
Upvote 0
Thank you guys, there are no blanks.
Going by the formula "=COUNTIFS($A$2:$A$12,A2,$B$2:$B$12,B2)>1 " output will be

[...]

If all item type are same then its TRUE, IF any one item type is different all should be false to that particular ID.

If no blanks, see Marcilio's modification in post #4 . That is:

=COUNTIFS($A$2:$A$20,A2,$B$2:$B$20,B2)=COUNTIFS($A$2:$A$20,A2)
 
Upvote 0

Forum statistics

Threads
1,214,902
Messages
6,122,161
Members
449,069
Latest member
msilva74

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