Solved

Record values from one column based on those in another column

Posted on 2014-10-07
4
129 Views
Last Modified: 2014-10-07
The attached Excel workbook includes the data that corresponds with the two calculation needs associated with this question:

1) Need to fill Column C of the "ResultsTable" sheet with the day of year (DOY; in Column F of the "Data" sheet) that corresponds with the max depth for that year.  If two DOY's have the same max depth, return the largest of the two DOY's

2) Need to fill Column D with the DOY that corresponds with the first zero value encountered subsequent to the value derived in Column C.

I manually populated the correct values for AllSeasYear = 1993.

Is there a good way to automate this with Excel functions?
OriginalDataFile.xlsx
0
Comment
Question by:dougf1r
  • 2
  • 2
4 Comments
 
LVL 27

Assisted Solution

by:Glenn Ray
Glenn Ray earned 500 total points
ID: 40366889
The MaxDepthDOY value can be found with this formula (in C2, copied down):
=INDEX(OFFSET(Data!F1,MATCH(A2,Data!E:E,0)-1,0,COUNTIF(Data!E:E,A2)),MATCH(B2,OFFSET(Data!J1,MATCH(A2,Data!E:E,0)-1,0,COUNTIF(Data!E:E,A2),1),0))

Still working on the second one...

-Glenn
0
 
LVL 1

Author Comment

by:dougf1r
ID: 40366954
Works perfect. Thanks Glenn.
0
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 500 total points
ID: 40367001
Here's the formula for the first zero depth day after the Maximum - in cell D2, copied down (deep breath):
=OFFSET(Data!$F$1,MATCH(A2,Data!E:E,0)+MATCH(C2,OFFSET(Data!$F$1,MATCH(A2,Data!E:E,0)-1,0,COUNTIF(Data!E:E,A2),1),0)-1+MATCH(0,OFFSET(Data!$J$1,MATCH(A2,Data!E:E,0)+MATCH(C2,OFFSET(Data!$F$1,MATCH(A2,Data!E:E,0)-1,0,COUNTIF(Data!E:E,A2),1),0)-2,0,180,1),0)-2,)

To simplify things (no, really), the formula is only looking ahead 180 days after the max; seems to work.  My gut tells me this might be made a bit simpler, but I'm inclined to leave it be.

Regards,
-Glenn
0
 
LVL 1

Author Comment

by:dougf1r
ID: 40367123
Fantastic! Yes, 180 days after the max works just fine. Many thanks!
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
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;…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

816 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

8 Experts available now in Live!

Get 1:1 Help Now