Get last non-blank value from row (non-consecutive cells)

nosolas

New Member
Joined
Mar 29, 2021
Messages
2
Office Version
  1. 2016
Hi, this is my first time posting on this forum. I've found many answers to my excel problems in the past, which i'm very thankful for!

I have a particular query for which i could not find an answer. See below table (3 columns on the left are the expected final values collected, on the other columns are the cells to search from):

Value ReturnedValue ReturnedValue Returned
Latest DateLatest RevisionLatest
Reference
DateRevisionReferenceDateRevisionReferenceDateRevisionReferenceDateRevisionReferenceDateRevisionReferenceDateRevisionReference
25-Mar-212DOC H18-Mar-210DOC A21-Mar-211DOC B25-Mar-212DOC H
04-Apr-212DOC W18-Mar-210DOC Y21-Mar-211DOC Z04-Apr-212DOC W

The purpose is to find the latest date on farther right column with a non-blank cell in a row and return this date. Then it will get the 2 next cells after this date and also return the values.

The format of the columns is fixed, and its repeated (date-revision-reference ; date-revision-reference ; etc.). ; the dates will be incrementing on the columns from left to right (as shown in the example)

Appreciate help for the above query (if possible without VBA solutions, since i'm not very familiar with those)

Thank you!
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Does this do what you want?

21 03 29.xlsm
ABCDEFGHIJKLMNOPQRSTUV
1Latest DateLatest RevisionLatest ReferenceDateRevisionReferenceDateRevisionReferenceDateRevisionReferenceDateRevisionReferenceDateRevisionReferenceDateRevisionReference
225-Mar-212DOC H18-Mar-210DOC A21-Mar-211DOC B25-Mar-212DOC H
34-Apr-212DOC W18-Mar-210DOC Y21-Mar-211DOC Z4-Apr-212DOC W
Latest Date
Cell Formulas
RangeFormula
A2:A3A2=LOOKUP("ZZZ",G2:V2,E2:T2)
B2:B3B2=LOOKUP("ZZZ",G2:V2,F2:U2)
C2:C3C2=LOOKUP("ZZZ",G2:V2)
 
Upvote 0
Solution
Hi there, welcome!

Here is another option without specifying where the farthest column is, and assuming the number under "Revision" never reaches 1000:

Book3
ABCDEFGHIJKLMNOPQRSTUV
1Value ReturnedValue ReturnedValue Returned
2Latest DateLatest RevisionLatest ReferenceDateRevisionReferenceDateRevisionReferenceDateRevisionReferenceDateRevisionReferenceDateRevisionReferenceDateRevisionReference
33/25/20212DOC H3/18/20210DOC A3/21/20211DOC B3/25/20212DOC H
44/4/20212DOC W3/18/20210DOC Y3/21/20211DOC Z4/4/20212DOC W
Sheet1
Cell Formulas
RangeFormula
A3:A4A3=1/LOOKUP(0.001,1/3:3)
B3:B4B3=1/LOOKUP(2,1/3:3)
C3:C4C3=LOOKUP("ZZZ",3:3)
 
Upvote 0
Thanks both for the answers.

Peter_SSs your solution worked perfectly. Thanks!
 
Upvote 0

Forum statistics

Threads
1,214,789
Messages
6,121,605
Members
449,038
Latest member
Arbind kumar

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