Multiple Criteria For One Field In Nested MIN(IF Formula

Wookiee

Active Member
Joined
Nov 27, 2012
Messages
429
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I'm tasked with identifying some very specific figures in an inventory report. I could certainly accomplish my task by using some VBA, but I prefer to use a formula.

My data is in a table (tblInv) and the fields from which I need to draw data are:

[Rep] = employee's name, stored in named range nrRep
[Category] = type of work
[Batch Status] = will always use a value of "Open"
[Received] = date the work was received

I have successfully constructed some nested MIN(IF array formulas which only take one criterion per field, but I need to use a fuzzy parameter and none of my attempts so far have worked.

My reporting requirements dictate that I extract the oldest record (minimum value in Received) for the chosen employee (nrRep) where the batch status is "Open".

The tricky part of the equation is the criteria for the Category field. All work is categorized as "Tape" or "Paper". There are two specific values which fall under "Tape" (Tape File and Tape PG); every other value is considered "Paper".

I was able to get the correct date for the Oldest Tape using the array formula below...

{=MIN(IF(tblInv[Rep]=nrRep,IF(tblInv[Batch Status]="Open",IF(OR(tblInv[Category]="Tape File",tblInv[Category]="Tape PG"),tblInv[Received]))))}

but the formula to exclude those two categories continues to elude me. I tried IF(tblInv[Category]<>"Tape*", IF(tblInv[Category]="<>Tape*", as well as IF(AND and IF(OR constructions using both of the Tape categories.

Unfortunately, I can't sit around and wait for Microsoft to introduce the MINIFS function, so can someone please offer any advice?

Thanks all!
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
I put together a mockup version of the file and, in the process, discovered that the array formula I originally assumed was working correctly does not do so in every case. Anyways, if anyone's feeling adventurous, I saved the file with example data as well as the results which should be returned. It can be viewed via the link below:

https://drive.google.com/file/d/0B03QVPPcP2UwVXZPTnI4R0trVXM/edit?usp=sharing
 
Upvote 0
I finally came up with a solution for this issue. It's not as elegant as I would like, but it enabled me to construct a MIN(IF array formula which returns the correct result.

First, I added another column to my data table (Type) so that I could determine whether the primary category was Paper or Tape. This was the formula I used in that column:

Rich (BB code):
=IF(LEFT(tblInv[[#This Row],[Category]],4)="Tape","Tape","Paper")

Once that column was in place, I was able to point my array formula to the new column instead of confusing Excel with my IF and OR constructions. The final formula was:

Rich (BB code):
{=MIN(IF(tblInv[Batch Status]="Open", IF(tblInv[Rep]=nrRep, IF(tblInv[Type]="Tape", tblInv[Received]))))}
 
Upvote 0

Forum statistics

Threads
1,215,011
Messages
6,122,680
Members
449,091
Latest member
peppernaut

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