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

Use the value in the last non-empty cell without using VBA

I have a simple table:

enter image description here

I want to use the value in the last filled "k" row (currently in this example it would be the 8, but the week prior it would have been the 2, and next week it would be whatever is entered into the 6th) in a calculation.

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

Is there a way of doing this formulaically rather than using the dreaded VBA?

>Solution :

Try using either of the one:

enter image description here


• Formula used in cell M2

=LOOKUP(2,1/(K:K<>""),K:K)

• Formula used in cell N2

=INDEX(K:K,MATCH(7^89,K:K))

• Formula used in cell O2

=XLOOKUP(TRUE,K:K<>"",K:K,,1,-1)

Here is an update please see it works

enter image description here


The solutions provided is working as per requirements

enter image description here


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