Return minimum values from matrix

cs56lioy

New Member
Joined
Dec 9, 2024
Messages
6
Office Version
  1. 2021
Platform
  1. Windows
I have this matrix (not data in cells), like so:
Excel Formula:
{3,5,1;2,2,4}
351
224
The MIN may or may not be in the same column

I need to return the MIN of each row in a column, meaning {1;2}
1
2

Any help would be appreciated
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hello, this might be rather too complicated but you can give it a try:

Excel Formula:
=LET(
a,{3,5,1;2,2,4},
b,FILTERXML("<x><y>"&SUBSTITUTE(TEXTJOIN(",",,a),",","</y><y>")&"</y></x>","//y"),
c,FILTERXML("<x><y>"&SUBSTITUTE(TEXTJOIN(",",,IF(SEQUENCE(1,COLUMNS(a),1,1),SEQUENCE(ROWS(a)))),",","</y><y>")&"</y></x>","//y"),
d,SORTBY(b,c,1,b,1),
INDEX(d,SEQUENCE(ROWS(a),,1,COLUMNS(a)),0))
 
Upvote 0
How about
Excel Formula:
=LET(d,{3,5,1;2,2,4},r,ROWS(d),MOD(SMALL(d+SEQUENCE(r,,100,100),SEQUENCE(r,,,COLUMNS(d))),100))

@kvsrinivasamurthy 2021 does not have the Lambda functions and if it did you could just use
Excel Formula:
=BYROW({3,5,1;2,2,4},MIN)
 
Upvote 1
Solution
You could always put this in a cell and copy it down one row...

=MIN(INDEX({9,5,4;5,3,4},ROWS($1:1)))
 
Upvote 0
Thank to all for the great answers.
I do have Excel 2024, so I could use BYROW

As a side note, just checked again the Excel Version in Account Details in this forum, and 2024 is not an option (yet), that's why my profile says 2021
 
Upvote 0
@cs56lioy, the Xl version options has been updated, so you can now show 2024.
 
Upvote 0
I do have Excel 2024, so I could use BYROW
Does that mean the MS help for BYROW is incorrect, as it does not show 2024 as an applicable version?

1734218827147.png
 
Upvote 0

Forum statistics

Threads
1,225,626
Messages
6,186,087
Members
453,336
Latest member
Excelnoob223

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