how to find the location of minimum value in an array

Nas2391

New Member
Joined
Mar 7, 2013
Messages
21

i have one row and 5columns.(row-a, columns-a,b,c,d,e)
nd each of the cells have a value.(eg: 256,5255 etc). i have written a code to extract the last digit of al the values and stored them in an array.
now my question is how to find the min of al the values stored in the array and its respective position in the excel sheet.

can some1 help me out in this.


thanks in advance :)
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hi Nas2391,

This might help.

=IF(MIN($C$1:$C$5)=C1,ROW(C1),0)

So according to this formula, The Number represents the required Row having the minimum Value.

Regards,

Ishan M Mehta
 
Upvote 0
hey ishan can u jus xplain me wat xactly u did here?

and there's is only one row. so no need to find out the row number..

i need to find the column number in which the minimum value is found.
 
Upvote 0
Hi,
Thanks for writing!

You can use the formula:

="Value "&MIN(--RIGHT(A1:E1,1))&" Position "&MAX(((MIN(--RIGHT(A1:E1,1)))=(--RIGHT(A1:E1,1)))*(COLUMN(A1:E1)))



Split the formula if you need the values in different cells.

Also make sure you use Control+Shift+Enter while entering the formula since its an array operation.

Thanks/Raj
 
Upvote 0
hey thanks raj.
but i dint find any usage of the array in the above formula..
i want the formula for findin out the min value in array and its position.(because i stored al the last digits of values in the array and i want the min of them)
 
Upvote 0
for eg:

c1 c2 c3 c4 c5 c6

r1 5275 5276 5273 5274 258 273

so now i collected al the last digits of the values in to an array.
so i need to find the smallest of al the last digits that are stored in the array and i need to find the location of it( i mean from which column is it comin)

now there are two 3's and it is the smallest.. i need to knw from wat al columns is 3 cming.
 
Upvote 0

Forum statistics

Threads
1,215,084
Messages
6,123,029
Members
449,092
Latest member
ikke

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