Solved

Excel Offset Formula Question

Posted on 2013-02-04
4
289 Views
Last Modified: 2013-02-05
In the attached spreadsheet, I have two columns of data, with the top row returning the last cell of data with an offset formula, as it should. However, I'd like to get a formula that returns the last value in the column -- only if the one next to it is filled.

In my example, I'd like the date 01/31 returned, instead of the date 02/04.

How do I write this type of formula?

Thanks!
EE2.xlsx
0
Comment
Question by:Cactus1994
  • 2
4 Comments
 
LVL 24

Accepted Solution

by:
Steve earned 500 total points
Comment Utility
OK, I am not sure if I am grasping the question fully, but attached is the file ammended for the first column to return the coresponding cell to column B...

the formula is the same as in B1 except that is OFFSETS -1 from the result of B1

=OFFSET(B$2,MATCH(MAX(B$2:B363)+1,B$2:B363,1)-1,-1)
EE2.xlsx
0
 
LVL 50

Expert Comment

by:barry houdini
Comment Utility
You could use LOOKUP to get the last time from column B in B1, i.e.

=LOOKUP(9.99E+307,B3:B366)

then in A1 to get the corresponding date try

=LOOKUP(9.99E+307,B3:B366,A3:A366)

regards, barry
0
 

Author Closing Comment

by:Cactus1994
Comment Utility
Thanks, guys. I like the OFFSET rather than the LOOKUP in this case, because only one formula needs to be entered. Works perfectly ... thanks!
0
 
LVL 50

Expert Comment

by:barry houdini
Comment Utility
I'm not suggesting you use any more formulas than you are currently using - the first LOOKUP replaces your B1 formula and the second replaces the A1 formula.

LOOKUP and MATCH use the same technique here to find the last value, but with MATCH you only get the position....and OFFSET is being used to get the value from that position.......but with LOOKUP you don't need that two stage approach - it just gives you the last value directly......

regards, barry
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now