replace array formula

andycreber

Board Regular
Joined
May 20, 2010
Messages
74
Office Version
  1. 2016
hi

I want to place this array formula as it is too slow to process.

please could you help me find an alternative solution formula



{=MIN(IF($P$2:$P$50000=P3,IF($U$2:$U$50000<>"Fuel Card",$AM$2:$AM$50000)))}

Many thanks
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Andy,

try this:
Code:
[COLOR=#000000][FONT=Arial]=MINIFS($AM$2:$AM$50000,$P$2:$P$50000,P3,$U$2:$U$50000,"<>Fuel Card")[/FONT][/COLOR]

 
Upvote 0
Depending on the version of excel you are using, minifs() may not be available to you

Do you really have 50 000 rows?
Another option might be to use a helper column to pull out the values you need to test?
=if(and(P2=P3,U2<>"Fuel Card"),AM2,"")
copied down, then find the MIN of that column.
 
Upvote 0
Hi

I am using excel 2013

I do have 50000 rows unfortunately.


that last formula did not work either, sorry.

appreciate your help but I'm still stuck
 
Upvote 0
Thought I would list the columns for help

u2 = text contains Fuel Card or ****
am2 contains expected end date
 
Upvote 0
that last formula did not work either, sorry.

What didn't work?
wrong answer?
no answer?
something else?

What exactly did you do?
[Table="width:, class:grid"][tr][td] [/td][td]
F​
[/td][td]
G​
[/td][td]
H​
[/td][td]
I​
[/td][td]
J​
[/td][td]
K​
[/td][/tr]
[tr][td]
2​
[/td][td]aa[/td][td]
10​
[/td][td][/td][td]bb[/td][td]
20​
[/td][td]regular MIN[/td][/tr]

[tr][td]
3​
[/td][td]bb[/td][td]
20​
[/td][td]
20​
[/td][td][/td][td]
20​
[/td][td]array MIN[/td][/tr]

[tr][td]
4​
[/td][td]cc[/td][td]
30​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td]
5​
[/td][td]aa[/td][td]
40​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td]
6​
[/td][td]cc[/td][td]
50​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td]
7​
[/td][td]bb[/td][td]
60​
[/td][td]
60​
[/td][td][/td][td][/td][td][/td][/tr]

[tr][td]
8​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[/table]

Helper column
=IF(F2=$I$2,G2,"")
copied down

J2=MIN(H2:H6)
J3=MIN(IF($F$2:$F$7=I2,$G$2:$G$7))
 
Upvote 0
Another possibility. I don't think this will be any faster, but it's entered as a regular formula.

=AGGREGATE(15, 6, $AM$2:$AM$50000 / (($P$2:$P$50000=P3) * ($U$2:$U$50000<>"Fuel Card")), 1)

15 is the AGGREGATE version of SMALL, 6 ignores errors, 1 tells it to look for the first smallest.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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