Find Latest value that meets Criteria

HeyItsDizzy

New Member
Joined
Apr 11, 2018
Messages
20
I am wondering how can i find the latest information that meets my criteria, because all my table are run form a formula we the "Blank" cells will always read as a')', there fore i am having a Countif, Sumif, Maxif, etc issues, i am probably just typing my formula incorrectly.

Based on the following table, I need the Red X to equal '5'. Lets say for example i have already collated my data and all I am looking at is Salesmen 'John', lets also preten that John made not sales in Month 3 because he was on vacation, but all i want to know when that last sale was made in this case the '5th' month was his latest sale. as stated all cells will have numbers in them as that infor is fed through other formulas, as you know if a formula returns 'Nil' as a result then a '0' is placed in the sell

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Name[/TD]
[TD="align: center"]John[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Lates sale made[/TD]
[TD="align: center"]'x'[/TD]
[TD]'th Month[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Name[/TD]
[TD]Month[/TD]
[TD]Sales Made[/TD]
[TD]Sales ($)
[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]2[/TD]
[TD]5[/TD]
[TD]200[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]3[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]4[/TD]
[TD]2[/TD]
[TD]200[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]5[/TD]
[TD]4[/TD]
[TD]300[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]6[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Hi, Try Below:


Book1
ABCD
1NameJohn
2Lates sale made5'th Month
3
4NameMonthSales MadeSales ($)
5John11100
6John25200
7John300
8John42200
9John54300
10John600
Sheet1
Cell Formulas
RangeFormula
C2=AGGREGATE(14,6,($A$5:$A$10=$C$1)*($C$5:$C$10>0)*($B$5:$B$10),1)
 
Upvote 0
Another option:

=MAXIFS(B5:B10,A5:A10,C1,C5:C10,">"&0)
 
Upvote 0
Thank you So much! all 3 options work perfectly!,

#1. =AGGREGATE(14,6,($A$5:$A$10=$C$1)*($C$5:$C$10>0)*($B$5:$B$10),1)
- By Aryatect

#2. =LOOKUP(2,1/((C5:C10 > 0)*(A5:A10=C1)),(B5:B10))
-
By DanteAmor

#3. =MAXIFS(B5:B10,A5:A10,C1,C5:C10,">"&0)
- By Aryatect

Now depending how complex the overall task is, with over 100 salesmen across 12 different sheets I will try them all and see which works best for larger data bases
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,885
Members
452,364
Latest member
springate

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