# MATCH function to find position of the result of NameRange

#### ififthelement

##### New Member
Hi All,

I have 3 user defined Names - ExecWinchrome, ExecWinFireFox, ExecWinIE.

I need a function that tells me which one of these has minimum value and then find the position. In turn based on the position, I wast to display the Name

I tried the following

=Match(MIN(ExecWinchrome, ExecWinFireFox, ExecWinIE), {ExecWinchrome, ExecWinFireFox, ExecWinIE}, 0)

The Lookup_Array in RED gives error. How do I tell Excel that its an array of the result of the Name variable ?

if the result of MATCH is 1, i will shows Win-chrome; if 2 I will show Win-FF, if 3, I will show WinIE.

Instead of those variable in RED, if I directly put the number like {100,89,95} is tell me the correct result of MATCH, because the MIN function does its work perfectly.

Last edited:

### Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a \$25,000 loan, 5% annual interest, 60 month loan.

#### Domenic

##### MrExcel MVP
Try the following formula, which needs to be confirmed with CONTROL+SHIFT+ENTER...

=INDEX({"Win-chrome","Win-FF","WinIE"},MATCH(TRUE,COUNTIF(INDIRECT({"ExecWinchrome","ExecWinFireFox","ExecWinIE"}),MIN(ExecWinchrome, ExecWinFireFox, ExecWinIE))>0,0))

Hope this helps!

#### ififthelement

##### New Member
Hi Domenic,

the code INDIRECT({"ExecWinchrome","ExecWinFireFox","ExecWinIE"}) generates #REF!

the name Variable ExecWinchrome, etc only worked inside the MIN or with = symbol. otherwise it is not working.

#### ififthelement

##### New Member
Hi Domenic,

the code INDIRECT({"ExecWinchrome","ExecWinFireFox","ExecWinIE"}) generates #REF!

the name Variable ExecWinchrome, etc only worked inside the MIN/MAX or with = symbol. otherwise it is not working.

From my query, for the RED content {ExecWinchrome, ExecWinFireFox, ExecWinIE} ; I am expecting the return exactly as
{45,23,39} .... including the Parenthesis. so that the formula above can work. in which case the formula I was trying out will also work

So for the formula =Match(MIN(ExecWinchrome, ExecWinFireFox, ExecWinIE), {ExecWinchrome, ExecWinFireFox, ExecWinIE}, 0)

if Excel can interpret as =Match(MIN(45,23,39), {45,23,39}, 0) then the result would evaluate to

=Match(23, {45,23,39}, 0) ... which then gives me 2. that is desired

##### MrExcel MVP
What are the defintions of ExecWinchrome, ExecWinFireFox, and ExecWinIE?

#### XOR LX

##### Well-known Member
Hi.

So ExecWinchrome, ExecWinFireFox, ExecWinIE are Defined Names, not for worksheet ranges, but each for single values, i.e. 45, 23 and 39?

If so:

=MATCH(MIN(ExecWinchrome,ExecWinFireFox,ExecWinIE),CHOOSE({1,2,3},ExecWinchrome,ExecWinFireFox,ExecWinIE),0)

Regards

#### ififthelement

##### New Member
these are user defined names. Each of them will return an integer only

#### XOR LX

##### Well-known Member
these are user defined names. Each of them will return an integer only

So in that case what result did the formula I posted give?

Regards

#### ififthelement

##### New Member
XOR, ur Super Duper Awesome ! it worked

Replies
3
Views
508
Replies
15
Views
601
Replies
9
Views
488
Replies
3
Views
649
Replies
3
Views
686

1,195,595
Messages
6,010,632
Members
441,558
Latest member
lambierules

### 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?

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