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

NameJohn
Lates sale made'x''th Month
NameMonthSales MadeSales ($)
John11100
John25200
John300
John42200
John54300
John600

<tbody>
</tbody>
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
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
Glad we could help and thanks for the feedback !
 
Upvote 0
I'm glad to help you. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,384
Messages
6,119,201
Members
448,874
Latest member
Lancelots

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