Excluding a cell from MINIFS calculation - error when excluded cell is equal to first cell in range

bec_v

New Member
Joined
Jan 15, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I have a longitudinal dataset of size over time. Two example datasets are included in screenshot below.

At each timepoint, I am trying to find the minimum value in the range up to the current timepoint. I also need to exclude/ignore the size at Timepoint #1 (value in red) from all calculations.

I've had success using the MINIFS function as seen in the second example dataset below. In this example the formula is =MINIFS($B9:C9,$B9:C9,"<>"&$C$9). As can be seen, the minimum at Timepoint #2 = 50 since the function has correctly ignored the value of 50 in cell C9.

Where I am now coming across a problem is where the value in the cell to be excluded is equal to the value of the cell in the first range. This incorrectly returns a value of ZERO and can be seen in the first example dataset below. The same formula has been used: =MINIFS($B2:C2,$B2:C2,"<>"&$C$2) in this case. As can be seen, the size at Timepoint #0 = the size at Timepoint #1 (i.e. both are = 23). The minimum result = 0 when it should be = 23.

The formula works just fine at all other timepoints in both examples, it is only when the first cell in the range is same value as the cell to be excluded that the miscalculation occurs.

Does anyone know where I might be going wrong?!


View attachment 105116
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Picture1.png
 
Upvote 0
Hi, welcome to the forum!

Your example formulas don't really tie back to the images you posted. But using cells as per the image, perhaps you can try like this:

Book1
ABCDEFGHIJKL
1
2
3012345678910
423231815101218252057
523181510101010105
Sheet1
Cell Formulas
RangeFormula
D5:L5D5=MINIFS($B4:C4,$B3:C3,"<>1")
 
Upvote 0

Forum statistics

Threads
1,223,854
Messages
6,175,018
Members
452,602
Latest member
Luka Vladimir

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