MINIFS from more columns

zico8

Board Regular
Joined
Jul 13, 2015
Messages
227
HI,

Can I use MINIFS function to find result from data in two columns?

For example:
Column A stores Names, whilst Columns B and C store random numbers.
Can I find the lowest number from both columns (B and C) from rows where the Name will be found?

like:
Code:
=MINIFS(B:C;A:A;Name)

I can do that this way and the result will be the same (I think so):
Code:
=MIN(MINIFS(B:B;A:A;Name);MINIFS(C:C;A:A;Name))

but what if numbers will be stored in much more columns instead of two?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Try this array formula

<table border="1" cellspacing="0" style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:76.04px;" /><col style="width:76.04px;" /><col style="width:76.04px;" /><col style="width:76.04px;" /><col style="width:76.04px;" /><col style="width:76.04px;" /><col style="width:76.04px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >A</td><td >B</td><td >C</td><td >D</td><td >E</td><td >F</td><td >G</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td style="background-color:#92d050; ">NAMES</td><td style="background-color:#92d050; ">B</td><td style="background-color:#92d050; ">C</td><td style="background-color:#92d050; ">D</td><td style="background-color:#92d050; ">E</td><td > </td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >2</td><td >name1</td><td style="text-align:right; ">36</td><td style="text-align:right; ">26</td><td style="text-align:right; ">9</td><td style="text-align:right; ">43</td><td > </td><td >name8</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >3</td><td >name2</td><td style="text-align:right; ">40</td><td style="text-align:right; ">28</td><td style="text-align:right; ">49</td><td style="text-align:right; ">36</td><td > </td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >4</td><td >name3</td><td style="text-align:right; ">45</td><td style="text-align:right; ">41</td><td style="text-align:right; ">25</td><td style="text-align:right; ">33</td><td > </td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >5</td><td >name4</td><td style="text-align:right; ">23</td><td style="text-align:right; ">33</td><td style="text-align:right; ">13</td><td style="text-align:right; ">12</td><td > </td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >6</td><td >name5</td><td style="text-align:right; ">16</td><td style="text-align:right; ">26</td><td style="text-align:right; ">9</td><td style="text-align:right; ">7</td><td > </td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >7</td><td >name6</td><td style="text-align:right; ">41</td><td style="text-align:right; ">38</td><td style="text-align:right; ">38</td><td style="text-align:right; ">16</td><td > </td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >8</td><td >name7</td><td style="text-align:right; ">46</td><td style="text-align:right; ">33</td><td style="text-align:right; ">6</td><td style="text-align:right; ">10</td><td > </td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >9</td><td >name8</td><td style="text-align:right; ">8</td><td style="text-align:right; ">33</td><td style="background-color:#ffff00; text-align:right; ">5</td><td style="text-align:right; ">47</td><td > </td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >10</td><td >name9</td><td style="text-align:right; ">37</td><td style="text-align:right; ">25</td><td style="text-align:right; ">27</td><td style="text-align:right; ">21</td><td > </td><td > </td></tr></table><br /><table style="font-family:Arial; font-size:10pt; border-style: groove ;border-color:#00ff00;background-color:#fffcf9; color:#000000; "><tr><td ><b></b></td></tr><tr><td ><table border = "1" cellspacing="0" cellpadding="2" style="font-family:Arial; font-size:9pt;"><tr style="background-color:#cacaca; font-size:10pt;"><td >Cell</td><td >Formula</td></tr><tr><td >G2</td><td >{=INDEX($A$2:$A$10,MIN(IF($B$2:$E$10=MIN($B$2:$E$10),ROW($B$2:$E$10)))-1)}</td></tr></table></td></tr></table>

Array formulas
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself
 
Upvote 0
Try this

Sub MINIFS()
Dim r As Range
Set r = Range("B:E")
Set b = r.Find(WorksheetFunction.Min(r), LookIn:=xlValues, lookat:=xlWhole)
MsgBox "Name : " & Range("A" & b.Row)
End Sub
 
Upvote 0
Hi,

I cannot see where you point the Name that min value should be looking for.

The result goes to a msgbox.
I do not put the result to another part because I do not know where to put it, in your question you did not put that.
Nor did you indicate that you wanted it in VBA.
 
Upvote 0
I do not ask where you put the result.
I cannot see from where you push the Name - i.e. "name8"
 
Upvote 0
I do not ask where you put the result.
I cannot see from where you push the Name - i.e. "name8"

Sorry. Then I did not understand your requirement.Forget the formulas for a moment and VBA code.


Show with an example the data you have, what are the conditions and the result you expect. All explained with examples.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

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