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
 
Book1
ABCD
1C1C2C3C4
2Accounting and FinanceAccounting and FinanceBusiness and ManagementAccounting and Finance
3Art, Design and FashionArt, Design and FashionArt, Design and FashionArt, Design and Fashion
4Accounting and FinanceBusiness and ManagementBiosciences
5Aerospace EngineeringBusiness and ManagementBusiness and ManagementBusiness and Management
6Business and ManagementAccounting and FinanceBusiness and ManagementBusiness and Management
7Business and ManagementComputer ScienceMarketing
Sheet2
Cell Formulas
RangeFormula
D2:D7D2=BYROW(A2:C7,LAMBDA(x,@SORT(IF(XMATCH(x,x,,-1)>XMATCH(x,x),x,""),,-1,1)))
Dynamic array formulas.
 
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,215,465
Messages
6,124,980
Members
449,201
Latest member
Lunzwe73

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