Formula Help

treeleaf20

Board Regular
Joined
Mar 17, 2009
Messages
159
Office Version
  1. 365
Platform
  1. Windows
All,
Say I have the following Data Set:
HTML:
<table>
<tr><td>Num</td><td>Category</td></tr>
<tr><td>12345</td><td>AA</td></tr>
<tr><td>12345</td><td>AB</td></tr>
<tr><td>67890</td><td>AA</td></tr>
<tr><td>81737</td><td>AB</td></tr>
<tr><td>28748</td><td>AA</td></tr>
<tr><td>28748</td><td>AB</td></tr>
</table>

I'm trying to find a formula to say check the number in the Num and find out if it has an AA and a AB segment. If it has both then basically say True, if it's missing one, put which one it's missing. So my results would look something like this:
HTML:
<table>
<tr><td>Num</td><td>Category</td></tr>
<tr><td>12345</td><td>AA</td><td>True</td></tr>
<tr><td>12345</td><td>AB</td><td>True</td></tr>
<tr><td>67890</td><td>AA</td><td>AB</td></tr>
<tr><td>81737</td><td>AB</td><td>AA</td></tr>
<tr><td>28748</td><td>AA</td><td>True</td></tr>
<tr><td>28748</td><td>AB</td><td>True</td></tr>
</table>

Any help would be greatly appreciated. Thanks in advance.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Your data in A2:B7 :

C1:AA

D1:AB


C2 copy down:
Code:
=IF(AND(SUMPRODUCT(--($A$2:$A$7=A2),--($B$2:$B$7=$D$1))=1,SUMPRODUCT(--($A$2:$A$7=A2),--($B$2:$B$7=$C$1))=1),"true",IF(AND(SUMPRODUCT(--($A$2:$A$7=A2),--($B$2:$B$7=$D$1))=1,SUMPRODUCT(--($A$2:$A$7=A2),--($B$2:$B$7=$C$1))<>1),"AA","AB"))
 
Upvote 0

Forum statistics

Threads
1,224,584
Messages
6,179,693
Members
452,938
Latest member
babeneker

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