Solved

Excel Offset Formula Question

Posted on 2013-02-04
4
299 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 24

Accepted Solution

by:
Steve earned 500 total points
ID: 38853988
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
ID: 38854610
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
ID: 38854729
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
ID: 38854914
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

717 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