INDEX, MATCH and MAX Functions - with the SAME dates !

i_am_tommo

New Member
Joined
Mar 22, 2016
Messages
4
Hi all

I am banging my head on my desk trying to find a way to get this great function to work for me!

Basically, I have a recruitment process that I am following in excel - 10,000+ rows for every position I am recruiting for, with 20+ columns containing information about the position - including dates of actions completed in the process flow.

I am using a formula like this to display in Column A the 'last process step' completed according to the most recent date.

=INDEX($AT$6:$BJ$6,MATCH(MAX($AT7:$BJ7),$AT7:$BJ7,0)) <--- this is from my actual database.

To translate it to the example table below, it should be:

=INDEX($D$1:$H$1,MATCH(MAX($D2:$H2),$D2:$H2,0))

This formula works for the most part, EXCEPT for when I have two dates exactly the same in the row - in which case it returns the date furthest to the left... I need it to return according to the date furthest to the RIGHT (as the further right I am, the further along the recruitment process I am.

In the example below you will see a representation of this: Sales, Admin and PMO positions should be displaying CVs Sent, Advertised and CVs Sent respectively, but it is returning the column title according to the date furthest to the left.

Do you guys have any idea on a solution for this? It would absolutely make my day!

Thanks a lot!

Tom

For example:
A1
B1
C1
D1
E1
F1
G1
H1
Last Status
Ref
Position
Received
Advertised
CVs Sent
Interview
Offer
Advertised
103424
Sales
01.01.2017
03.01.2017
03.01.2017
Received
103234
Admin
01.01.2017
01.01.2017
Received
102456
PMO
02.01.2017
02.01.2017
02.01.2017
Interview
103240
Data
13.01.2017
27.01.2017
01.02.2017
05.02.2017
Offer
103342
Manager
07.01.2017
08.01.2017
15.01.2017
01.02.2017
06.02.2017

<tbody>
</tbody>
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Try something like this...

Data Range
A
B
C
D
E
F
1
Action1​
Action2​
Action3​
Action4​
Action5​
2
Action2​
1/1/2017​
1/12/2017​
3
Action3​
1/2/2017​
1/2/2017​
1/2/2017​
4
Action5​
1/5/2017​
1/10/2017​
1/10/2017​
1/10/2017​
1/10/2017​

This formula entered in A2 and copied down:

=IFERROR(LOOKUP(1E100,B2:F2,B$1:F$1),"")
 
Upvote 0
Thanks T.Valko - I have used this formula before with some success - it definitely returns the date furthest to the right.

The only problem is, that sometimes the dates of the actions are not always in order of left to right (I forgot to explain this part in the original description).

It could be that after the Interview status, the most recent action could go back to CV Sent (or any other previous status)

Here it is represented in the example table below (highlighted in Red)

A1B1C1D1E1F1G1H1
Last StatusRefPosition ReceivedAdvertisedCVs SentInterviewOffer
Advertised103424Sales01.01.201703.01.201703.01.2017
Received103234Admin01.01.201701.01.2017
Received102456PMO02.01.201702.01.201702.01.2017
Interview103240Data13.01.201727.01.201707.02.201705.02.2017
Offer103342Manager07.01.201708.01.201715.01.201701.02.201706.02.2017

<tbody>
</tbody>


This was my reason for using the INDEX, MATCH, MAX formula (except it isn't sufficient when I have two or more identical dates - in these cases, the furthest to the right is the 'last status' that I need to have returned).

Any other ideas would be greatly appreciated.

Thanks

Tom
 
Upvote 0
OK, try this version...

Data Range
A
B
C
D
E
F
1
Action1​
Action2​
Action3​
Action4​
Action5​
2
Action4​
1/1/2017​
1/7/2017​
1/2/2017​
1/7/2017​
3
Action1​
1/5/2017​
1/1/2017​
4
Action5​
1/22/2017​
1/12/2017​
1/12/2017​
1/15/2017​
1/22/2017​

This formula entered in A2 and copied down:

=IFERROR(LOOKUP(2,1/(B2:F2=MAX(B2:F2)),B$1:F$1),"")
 
Upvote 0

Forum statistics

Threads
1,216,084
Messages
6,128,724
Members
449,465
Latest member
TAKLAM

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