Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Google Sheets: by the last non-empty cell in column, return the value in corresponding cell in another column?

 Hello!
 So I have dates in Column A (A3:A). And I have transactions (formatted as currency) in Column C (C3:C). So I want a cell D3 in Column D to show the date (preferably only month but it is not vital) of the last transaction.
 In other words I need a formula that would check the whole Column C, find the last transaction (assuming that there will be blank cells in that column), find the corresponding date in Column A (date when transaction occured) and return that value (date) in cell D3 of Column D.

 INDEX? MATCH? HLOOKUP?
 Please advise.

Column A          Column C          Column D

3 01/01/2021            10.98                       01/05/2021
4 01/02/2021            15.64
5 01/03/2021
6 01/04/2021
7 01/05/2021            20.93
8 01/05/2021            76.28

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Try

=+sort(A:A, row(A:A)*(C:C<>""),)

or

=INDEX(A:A, MATCH(2, IF(C:C<>"", 1), 1))

or even

=lookup(9^9, C:C, A:A)

and see if that works?

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading