问题
I am trying to work out how to get a value from a column in an Excel (Office 365) Table based on the latest date from another column which is selected based on multiple criteria. I have written the formula to get the latest date, now i need to get a corresponding value from another column. I want to always get the last comment per customer in Column F so for CAMCO it would be Last Note.
An example below:
My formula in Column E is ={MAX(IF([Customer]=B2,[Date]))}
回答1:
To find the latest Note, use
=INDEX([Note], MATCH([@Customer] & "_" & MAXIFS([Date], [Customer], [@Customer]), [Customer] & "_" & MAXIFS([Date], [Customer], [@Customer]), 0))
Or, if column Latest Date per Customer
is a perminant addition
=INDEX([Note], MATCH([@Customer] & "_" & @[Latest Date per Customer], [Customer] & "_" & [Latest Date per Customer], 0))
FYI, your Latest Date lookup is better as
=MAXIFS([Date], [Customer], [@Customer])
Both are standard (not array) formula
来源:https://stackoverflow.com/questions/56178713/excel-table-find-value-based-on-latest-date-in-column-from-multiple-criteria