MinIfs Function

Copper Contributor

Hello, I'm having trouble formatting the minifs statement in VBA. I want the code to look for the minimum value in a data table with two criteria's applied. This what I have so far, I'm not sure if I'm formatting the code wrong or if its another way I need to code it in VBA.

Velasquezvictor_2-1656357564870.png

 

I figured out the formula format for the command but I want to run it in VBA, the formula format is the following:

Velasquezvictor_1-1656357530566.png

 

Any help would be greatly appreciated, thanks!

 

4 Replies

@Velasquezvictor 

Instead of Application.WorksheetFunction.Evaluate, use Application.WorksheetFunction.MinIfs or shorter, Application.MinIfs

@Hans Vogelaar 

I've tried that as well and it also doesn't seem to work

Velasquezvictor_0-1656358092741.png

 

@Velasquezvictor 

Is Data the name of the worksheet? If so, change Data to Worksheets("Data")

Ah haha never mind I figured it out, I was misspelling it the whole time. Thanks!