# Ignore 0 on aggregate small function

#### sgibbs183

##### New Member
I am trying to calculate the minimum value at the minimum or earliest date. My formula currently looks like =AGGREGATE(15,7,\$L\$2:\$L\$321/((R2=\$A\$2:\$A\$321)*(T2=\$C\$2:\$C\$321)),1) With L column being my helper values, R column being the reference, A column matching my references as there are multiple entries and T column being the earliest date with C column being the full list of dates.

My aggregate small function is returning zero only for some calculations when I include a filter however I want to see the smallest value for each reference at the earliest date in my list of values with the smallest value being around £1,000 when I put a filter on.

If anyone can help me I would very much appreciate it - I have tried to explain it the best way I can but sorry if it is confusing!

### Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

#### RoryA

##### MrExcel MVP, Moderator
You could turn the 0 values into errors like this:

=AGGREGATE(15,7,1/(1/(\$L\$2:\$L\$321/((R2=\$A\$2:\$A\$321)*(T2=\$C\$2:\$C\$321)))),1)

so that the AGGREGATE function ignores them.

#### sgibbs183

##### New Member
This works - thank you so much! I have been looking at that most of the morning!

#### RoryA

##### MrExcel MVP, Moderator
Glad to help. And a belated welcome to the forum!

#### sgibbs183

##### New Member
Hi Rory, me again! I have realized I need to include an IF formula in to my original formula. I need to add this - IF(K9<>"Basic Pay",IF(L9<>"Basic Pay") every time I add this it isn't working or returning zero again. Please can you help me?

I basically need to add ,IF(K9<>"Basic Pay",IF(L9<>"Basic Pay" to my original formula =AGGREGATE(15,7,1/(1/(\$L\$2:\$L\$321/((R2=\$A\$2:\$A\$321)*(T2=\$C\$2:\$C\$321)))),1)

Thank you so much in advance, I am loving this forum!

#### RoryA

##### MrExcel MVP, Moderator
What should the result be if one of the cells is "Basic pay"?

#### sgibbs183

##### New Member
I want the result to still calculate the minimum value at the latest date within the aggregate function but only on those which say basic pay.

Thanks for the quick response (again)

#### RoryA

##### MrExcel MVP, Moderator
That doesn't really answer my question, I'm afraid. First, what you posted is testing that both cells do not contain "Basic pay". Second if the formula is in row 2, do you really need to check row 9?

It would probably help if you could post a sample of your data and what you want as a result.

#### sgibbs183

##### New Member
Sorry Rory, my formula was incorrect.

I have attached an image of some sample data, I can't seem to download XL2BB. What I need to get from the data in the end if if that pay reference for basic pay only has seen a reversal in the pay so basically their pay has reduced since being with a certain company. I am struggling to find Minimum Value at the Latest Date (Highlighted Orange) because I want this to only return the minimum value if column f & g state basic pay so the answer in M4 should return £1,000. I don't know how to remove the values returning "False". I think it is just this part of my spreadsheet I need to fix.

Sorry if I haven't explained this very well.

#### RoryA

##### MrExcel MVP, Moderator
So what should it return rather than FALSE?

Replies
3
Views
135
Replies
5
Views
227
Replies
0
Views
65
Replies
0
Views
200
Replies
1
Views
43

1,182,023
Messages
5,933,320
Members
436,888
Latest member
Kantonides

### 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.

### Which adblocker are you using?

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

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