Return value that appears more than once in a row

davidthomas683070

New Member
Joined
Mar 15, 2023
Messages
5
Office Version
  1. 365
Hi, I've got 3 columns of data (Columns 1-3) and I'm wanting to extract a value into a column 4 if it appears more than once in that row. If a row doesn't contain the same value more than once, I don't need a value returning in column 4. Example below which shows the value that should be returned in column 4. If anyone can help it would be much appreciated!

1678879511849.png
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Excel Formula:
=IFERROR(INDEX($A1:$C1,MATCH(2,($A1:$C1=$A1)+($A1:$C1=$B1)+($A1:$C1=$C1),0)),"")
This is an array formula. Paste to formula bar and press Ctrl+Shift+Enter together.
 
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
Excel Formula:
=IFERROR(INDEX($A1:$C1,MATCH(2,($A1:$C1=$A1)+($A1:$C1=$B1)+($A1:$C1=$C1),0)),"")
This is an array formula. Paste to formula bar and press Ctrl+Shift+Enter together.
Hi, thanks very much for this. It appears to work for all rows in my example other than row 3 where it returns blank. In row 3 I would want it to return 'Art, Design and Fashion'.
 
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’)
Ok I've updated my Excel version
 
Upvote 0
OK, this should work:
Excel Formula:
=IFERROR(INDEX($A1:$C1,MATCH(2,($A1:$C1=$A1)+($A1:$C1=$B1)+($A1:$C1=$C1),-1)),"")
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,460
Messages
6,124,949
Members
449,198
Latest member
MhammadishaqKhan

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