Reverse or end value for Index/Match formula

philobr

Active Member
Joined
Oct 17, 2005
Messages
280
Hi there,
Hoping someone can help, if my question makes sense.

I have a formula (in B4) to look up the first value which appears in a row and give me a date from the matching column (apologies I dont know how to add formula and screenshots)

=IFERROR(INDEX($D$3:$L$3,1,MATCH(A4,D4:L4,0)),"")

A4 has X
Row 4 has X at D4, and that will bring back the value from D3
A B C D E
Mon Tues
X Mon X X

What I need is a similar formula in C4 to bring back the last value so C4 will say Tues.

Any ideas?
Thanks
 
Last edited:

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Try


[TABLE="class: grid"]
<tbody>[TR]
[TD="bgcolor: #DCE6F1"][/TD]
[TD="bgcolor: #DCE6F1"]
A
[/TD]
[TD="bgcolor: #DCE6F1"]
B
[/TD]
[TD="bgcolor: #DCE6F1"]
C
[/TD]
[TD="bgcolor: #DCE6F1"]
D
[/TD]
[TD="bgcolor: #DCE6F1"]
E
[/TD]
[TD="bgcolor: #DCE6F1"]
F
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
1
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
2
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
3
[/TD]
[TD]
Search​
[/TD]
[TD]
First​
[/TD]
[TD]
Last​
[/TD]
[TD]
Mon​
[/TD]
[TD]
Tue​
[/TD]
[TD]
Wed​
[/TD]
[/TR]
[TR]
[TD="bgcolor: #DCE6F1"]
4
[/TD]
[TD]
X​
[/TD]
[TD]
Mon​
[/TD]
[TD]
Wed​
[/TD]
[TD]
X​
[/TD]
[TD][/TD]
[TD]
X​
[/TD]
[/TR]
</tbody>[/TABLE]


Formula in B4
=INDEX($D$3:$L$3,MATCH(A4,D4:L4,0))

Formula in C4
=LOOKUP(2,1/(D4:L4=A4),$D$3:$L$3)

M.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,247
Messages
6,171,007
Members
452,374
Latest member
keccles

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