Ignore 0 on aggregate small function

sgibbs183

New Member
Joined
Aug 5, 2020
Messages
6
Office Version
  1. 365
  2. 2013
Platform
  1. Windows
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

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
37,828
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
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
Joined
Aug 5, 2020
Messages
6
Office Version
  1. 365
  2. 2013
Platform
  1. Windows
This works - thank you so much! I have been looking at that most of the morning!
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
37,828
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
Glad to help. :) And a belated welcome to the forum!
 

sgibbs183

New Member
Joined
Aug 5, 2020
Messages
6
Office Version
  1. 365
  2. 2013
Platform
  1. Windows

ADVERTISEMENT

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
Joined
May 2, 2008
Messages
37,828
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
What should the result be if one of the cells is "Basic pay"?
 

sgibbs183

New Member
Joined
Aug 5, 2020
Messages
6
Office Version
  1. 365
  2. 2013
Platform
  1. Windows

ADVERTISEMENT

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
Joined
May 2, 2008
Messages
37,828
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
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
Joined
Aug 5, 2020
Messages
6
Office Version
  1. 365
  2. 2013
Platform
  1. Windows
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.
Mr Xcel.PNG
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
37,828
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
So what should it return rather than FALSE?
 

Forum statistics

Threads
1,148,323
Messages
5,746,114
Members
423,992
Latest member
Lebohang Bulane

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
Top