MAX date, item match and empty cells

reiroch171

New Member
Joined
May 6, 2019
Messages
2
Hello Board,

Here is my dilemma.
I am trying to populate column H with the MAX date from column C where:
  1. item code matches (A=G)
  2. D is blank

If no items in D are blank, make zero. (I will conditional format so it's blank and not 1/0/1900 if I need to)

Note, this table A-D will NOT be sorted at all, so I don't think lookup will work?

I searched the forums and came up with the parts - sumproduct, max(if(etc)) but I can't get the whole thing to work.



A
BCDGH
1
renting serial
Date outExpected backActual back ItemCode
Date expected back
2ABC
10-Feb12-Feb12-Feb ABC1/0/1900
3ABC
10-Apr15-Apr12-Apr DEF5/20/2019
4ABC2-May5-May6-May GHI1/0/1900
5DEF1-May5-May5-May JKL2/12/2019
6DEF1-May20-May

7GHI8-Feb10-Feb
8GHI
1-Apr10-Apr10-Apr
9JKL10-Feb12-Feb

<colgroup><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>

What I tried:

Example: =SUMPRODUCT((Table13[renting serial]=$H2)*(Table13[Actual back]=0)) gets me just the count of lines
=MAX(IF(Table13[renting serial]=H2,Table13[Expected back])) gets me just the max date in the whole column.

Thanks so much,
Susan
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Welcome to the Board.

Try this formula in H2:

=MAX(IF($A$2:$A$9=G2,IF($D$2:$D$9="",$C$2:$C$9)))
and confirm it with Control+Shift+Enter. Drag down the column.

If you have Excel 365, check out the MAXIFS function.
 
Upvote 0
Hi & welcome to MrExcel.
How about


Excel 2013/2016
ABCDEFGH
1renting serialDate outExpected backActual backItemCodeDate expected back
2ABC10-Feb12/02/201912-FebABC00/01/1900
3ABC10-Apr15/04/201912-AprDEF20/05/2019
4ABC02-May05/05/201906-MayGHI10/02/2019
5DEF01-May05/05/201905-MayJKL12/02/2019
6DEF01-May20/05/2019
7GHI08-Feb10/02/2019
8GHI01-Apr10/04/201910-Apr
9JKL10-Feb12/02/2019
Doc1
Cell Formulas
RangeFormula
H2{=MAX(IF((Table13[renting serial]=G2)*(Table13[Actual back]=""),Table13[Expected back]))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Thanks that worked great.

Ps I was a user here like 8 years ago from my old job - can't remember the login though, so I started fresh :)
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,749
Members
449,050
Latest member
excelknuckles

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