Solved

Excel Offset Formula Question

Posted on 2013-02-04
4
295 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
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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

Suggested Solutions

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
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…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

820 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