Looking for the best formula to identify best option based on 3 columns of data

mcmuney

Board Regular
Joined
Sep 11, 2015
Messages
101
Office Version
  1. 365
Hello,
I'm needing to evaluate data in 3 columns to come up with the best result. On the below, Columns A-C has the data and Expected Results is what I need to come up with. What formula can easily achieve this? Thanks in advance.

ColumnAColumnBColumnCExpected Result
AppleAppleAppleApple
AppleBananaBananaBanana
#N/A​
Apple
#N/A​
Apple
CherryApple
#N/A​
Mixed
AppleBananaCherryMixed
#N/A​
#N/A​
#N/A​
#N/A​
 

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

=IF(MAX(COUNTIF(A2:C2,A2:C2))=1,"Mixed",INDEX(A2:C2,1,MAX(COUNTIF(A2:C2,A2:C2))))
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Hi

=IF(MAX(COUNTIF(A2:C2,A2:C2))=1,"Mixed",INDEX(A2:C2,1,MAX(COUNTIF(A2:C2,A2:C2))))
Hi, this worked perfect on the sample data, but when the data is rearranged it does not work. See example below:

ColumnAColumnBColumnCExpected ResultFormulaNote
AppleAppleAppleAppleAppleworks
AppleBananaBananaBananaBananaworks
#N/A​
Apple
#N/A​
AppleAppleworks
CherryApple
#N/A​
MixedMixedworks
AppleBananaCherryMixedMixedworks
#N/A​
#N/A​
#N/A​
#N/A​
#N/A​
works
AppleBananaAppleAppleBananadoes not work
#N/A​
#N/A​
BananaBanana
#N/A​
does not work
 
Upvote 0
Hi its working for me,
Please check your formula ranges

Book4
ABCDEFGH
1ColumnAColumnBColumnCExpected ResultFormulaNoteFormula
2AppleAppleAppleAppleAppleworksApple
3AppleBananaBananaBananaBananaworksBanana
4#N/AApple#N/AAppleAppleworksApple
5CherryApple#N/AMixedMixedworksMixed
6AppleBananaCherryMixedMixedworksMixed
7#N/A#N/A#N/A#N/A#N/Aworks#N/A
8AppleBananaAppleAppleBananadoes not workApple
9#N/A#N/ABananaBanana#N/Adoes not work#N/A
10
Sheet1
Cell Formulas
RangeFormula
G2:G9G2=IF(MAX(COUNTIF(A2:D2,A2:D2))=1,"Mixed",INDEX(A2:D2,1,MAX(COUNTIF(A2:D2,A2:D2))))
 
Upvote 0
Hi its working for me,
Please check your formula ranges

Book4
ABCDEFGH
1ColumnAColumnBColumnCExpected ResultFormulaNoteFormula
2AppleAppleAppleAppleAppleworksApple
3AppleBananaBananaBananaBananaworksBanana
4#N/AApple#N/AAppleAppleworksApple
5CherryApple#N/AMixedMixedworksMixed
6AppleBananaCherryMixedMixedworksMixed
7#N/A#N/A#N/A#N/A#N/Aworks#N/A
8AppleBananaAppleAppleBananadoes not workApple
9#N/A#N/ABananaBanana#N/Adoes not work#N/A
10
Sheet1
Cell Formulas
RangeFormula
G2:G9G2=IF(MAX(COUNTIF(A2:D2,A2:D2))=1,"Mixed",INDEX(A2:D2,1,MAX(COUNTIF(A2:D2,A2:D2))))
The formula doesn't work on the last 2 rows.
The formula should include columns A:C only.
Column D is the results I'm looking for and Column E is what the formula is producing.
Even in your version, row9 is wrong, it should be Banana, but showing #N/A.
 
Upvote 0

Forum statistics

Threads
1,223,249
Messages
6,171,031
Members
452,374
Latest member
keccles

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