Help! Complex Question - Maybe VLookUp or If/Max Commands??

jet05c

New Member
Joined
Jan 17, 2018
Messages
1
Hi!

I have been trying (for the past several hours) to find a solution to an issue that I have been having to no avail.


Here is my issue:

On one sheet I have a list, let's say construction projects. Each column contains pieces of other information on each project that is formatted so I can quickly print it out for higher-ups at my job (e.g., name of builder, date of contract, etc.). I have a second sheet that has some project data that is routinely imported from an outside source. As with the first spreadsheet, each row on the imported data represents a project, but each pair of columns on this spreadsheet reflects a various stage in construction (e.g.:
ProjectStep1Step1_DtStep2Step2_DtStep3Step3_DtStep4Step4_Dt
APermit Requested1/1/2012Permit Denied1/3/2012Request Revised12/4/2014
BPermit Requested1/4/2018
CPermit Requested2/5/2017Permit Approved3/1/2017Groundbreaking4/26/2017
DPermit Requested7/7/2017Permit Approved1/17/2018
EPermit Requested11/12/2014Permit Approved12/1/2014Groundbreaking1/2/2015Foundation Laid3/4/2015

<tbody>
</tbody>

As you can see, projects are in various stages at any given time. I want to add two columns to my main spreadsheet using this data to reflect 1) what stage the of development each project is in and 2) the date of the most recent stage. To get the date of the most recent stage, I tried using the following formula, but it gives me the max of all the rows, not just for the row that matches my project #: =MAX(IF(Sheet1!A2=Sheet2!A2:A6,0),Sheet2!C:C,Sheet2!E:E,Sheet2!G:G,Sheet2!I:I,0)


I tried using VLookup, but the need to specify which column to pull the information from was problematic, since the column depends on which one has the highest non-missing value. Once I get the right date, I then need to match it up with the value associated with the right/most-recent step in the process.


I'm honestly at my wits end with this. I have a feeling that there's a way to do it in excel, but this is way outside of my level of expertise. Any guidance you could provide would be greatly appreciated!


Thank you so much!

 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
How about using MATCH with INDIRECT?

=MAX(INDIRECT(MATCH(Sheet1!A2,$A:$A,0)&":"&MATCH(Sheet1!A2,$A:$A,0)))
 
Upvote 0
and even may be

=R[1]C[MATCH(MAX(INDIRECT(MATCH(Sheet1!A2,$A:$A,0)&":"&MATCH(Sheet1!A2,$A:$A,0))),INDIRECT(MATCH(Sheet1!A2,$A:$A,0)&":"&MATCH(Sheet1!A2,$A:$A,0)),0)]
 
Last edited by a moderator:
Upvote 0
Sorry,, last edit

=INDIRECT(SUBSTITUTE(ADDRESS(1,MATCH(MAX(INDIRECT(MATCH(Sheet1!A2,$A:$A,0)&":"&MATCH(Sheet1!A2,$A:$A,0))),INDIRECT(MATCH(Sheet1!A2,$A:$A,0)&":"&MATCH(Sheet1!A2,$A:$A,0)),0),4),1,"")&1)
 
Upvote 0
Maybe...

Assumes the dates in Sheet2 are real dates (numbers), not text

Sheet2

A
B
C
D
E
F
G
H
I
J
1
Project​
Step1​
Step1_Dt​
Step2​
Step2_Dt​
Step3​
Step3_Dt​
Step4​
Step4_Dt​
2
A​
Permit Requested​
01/01/2012​
Permit Denied​
01/03/2012​
Request Revised​
12/04/2014​
3
B​
Permit Requested​
01/04/2018​
4
C​
Permit Requested​
02/05/2017​
Permit Approved​
03/01/2017​
Groundbreaking​
04/26/2017​
5
D​
Permit Requested​
07/07/2017​
Permit Approved​
01/17/2018​
6
E​
Permit Requested​
11/12/2014​
Permit Approved​
12/01/2014​
Groundbreaking​
01/02/2015​
Foundation Laid​
03/04/2015​

<tbody>
</tbody>


Sheet1

A
B
C
1
Project​
Status​
Date​
2
A​
Request Revised​
12/04/2014​
3
B​
Permit Requested​
01/04/2018​
4
C​
Groundbreaking​
04/26/2017​
5
D​
Permit Approved​
01/17/2018​
6
E​
Foundation Laid​
03/04/2015​

<tbody>
</tbody>


Formula in B2 copied down
=INDEX(Sheet2!$B:$Z,MATCH(A2,Sheet2!$A:$A,0),MATCH(9.99E+307,INDEX(Sheet2!$B:$Z,MATCH(A2,Sheet2!$A:$A,0),0))-1)

Formula in C2 copied down
=INDEX(Sheet2!$B:$Z,MATCH(A2,Sheet2!$A:$A,0),MATCH(9.99E+307,INDEX(Sheet2!$B:$Z,MATCH(A2,Sheet2!$A:$A,0),0)))

Hope this helps

M.
 
Upvote 0

Forum statistics

Threads
1,214,392
Messages
6,119,254
Members
448,879
Latest member
oksanana

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