ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Pick last date in a column if more than two similar dates (https://www.excelbanter.com/excel-discussion-misc-queries/224324-pick-last-date-column-if-more-than-two-similar-dates.html)

MSSailor

Pick last date in a column if more than two similar dates
 
Have to lookup for the last day in a column A, The thing is that if I have
more than one similar date, it takes the first one in the column.

Column A
2009-03-03
2009-03-04
2009-03-05
2009-03-06 Mentioned formula picks this value
2009-03-06 I WANT THIS ONE..........

How to add the formula to look after the last day and pick the last value?
This what I have now!
=VLOOKUP(MAX(A9:A36),A9:L36,COLUMN(A20),FALSE)

Dave Peterson

Pick last date in a column if more than two similar dates
 
If you always want the last thing in that column and there are no gaps in the
range, you could use a formula like:

=index(a:a,counta(a:a))


MSSailor wrote:

Have to lookup for the last day in a column A, The thing is that if I have
more than one similar date, it takes the first one in the column.

Column A
2009-03-03
2009-03-04
2009-03-05
2009-03-06 Mentioned formula picks this value
2009-03-06 I WANT THIS ONE..........

How to add the formula to look after the last day and pick the last value?
This what I have now!
=VLOOKUP(MAX(A9:A36),A9:L36,COLUMN(A20),FALSE)


--

Dave Peterson

FARAZ QURESHI

Pick last date in a column if more than two similar dates
 
=LOOKUP(2,1/(B1:B20=A1),C1:C20)
--

Best Regards,
FARAZ A. QURESHI


"MSSailor" wrote:

Have to lookup for the last day in a column A, The thing is that if I have
more than one similar date, it takes the first one in the column.

Column A
2009-03-03
2009-03-04
2009-03-05
2009-03-06 Mentioned formula picks this value
2009-03-06 I WANT THIS ONE..........

How to add the formula to look after the last day and pick the last value?
This what I have now!
=VLOOKUP(MAX(A9:A36),A9:L36,COLUMN(A20),FALSE)



All times are GMT +1. The time now is 09:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com