Get the latest date but if there's blank the value should be blank

anneb_87

Board Regular
Joined
Jun 13, 2018
Messages
84
Hello World!

Can some help me?
How can I get the latest date on the following data?But if there's a blank date it should be blank.
I did the MAX IF for the latest date, I just don't know what to do on the condition if there's a blank date.

I would really appreciate your help!

Sample data:
client data received
client A 6/1/2018
client A 6/30/2018
client A 6/15/2018
client A
client A 6/5/2018
client B 6/20/2018
client B 6/12/2018
client B 6/1/2018
client B 6/5/2018

Expected output should be:
client data received
Client A
Client B 6/20/2018
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi,

If as long as there's any Blank Date field for a Client, use Blank as result...

I don't have the MAXIF function, so insert your current MAXIF within my formula where indicated:


Book1
AB
1clientdata received
2client A6/1/2018
3client A6/30/2018
4client A6/15/2018
5client A
6client A6/5/2018
7client B6/20/2018
8client B6/12/2018
9client B6/1/2018
10client B6/5/2018
11
12clientdata received
13Client A 
14Client B
Sheet82
Cell Formulas
RangeFormula
B13=IF(COUNTIFS(A$2:A$10,A13,B$2:B$10,"")>0,"","Your MAXIF formula here")
 
Upvote 0
Thank You @jtakw for your response!
I tried what you said and it did go well for the client A. But as I tried to copy the formula for client B. It didn't work.

Here's my formula:
Client A
{=IF(COUNTIFS($A$2:$A$10,A13,$B$2:$B$10,"")>0,"","MAX(IF($A$2:$A$20=A13,$B$2:B$2:$B$10))")}

Client B
{=IF(COUNTIFS($A$2:$A$10,A14,$B$2:$B$10,"")>0,"","MAX(IF($A$2:$A$20=A14,$B$2:B$2:$B$10))")}

Additional, when I copied and pasted the formula of Client A to Client B. I manually change the A14 from A13 in the MAXIF function. It didn't change automatically.

Do you have a different approach so I can get the latest date with the condition of blanks? Because I have like a hundreds of client to track. ???
 
Upvote 0
@anneb_87,

Do you have the curly braces {} around the formula in your workbook, as you have listed above? If you do, you're turning the formula into an array formula, which could be altering the functionality.

Brian
 
Upvote 0
Option 1. If MAXIFS is available on your Excel system, in B13 just enter and copy down:

=IF(COUNTIFS($A$2:$A$10,$A13,$B$2:$B$10,"="),"",MAXIFS($B$2:$B$10,$A$2:$A$10,$A13))

Option 2. With AGGREGATE, if your Excel version contains this function, in B13 just enter and copy down:

=IF(COUNTIFS($A$2:$A$10,$A13,$B$2:$B$10,"="),"",MAXIFS($B$2:$B$10,$A$2:$A$10,$A13))


Option 3. Otherwise, in B13 control+shift+enter, not just enter, and copy down:

=IF(COUNTIFS($A$2:$A$10,$A13,$B$2:$B$10,"="),"",MAX(IF($A$2:$A$10=$A13,$B$2:$B$10)))

Control+shift+enter: Press down the control and the shift keys at the same time while you het the enter key. If done successfully, Excel itself puts a pair of { and } around the formula in recognition.
 
Upvote 0
@aladinakyurek
I don't have MAXIFS function. I tried the Aggregate function but it is only working for client A as well. As I copy the formula to Client B, I am having an error of #VALUE !.

WHAT SHOULD I DO? ???
 
Upvote 0
I want to THANK EVERYONE!!

The correct formula should be
{=IF(COUNTIFS($A$2:$A$10,$A13,$B$2:$B$10,"="),"",MAX(IF(
$A$2:$A$10=A13,$A13,$B$2:$B$10)))

???
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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