# How can I bring back the last true value between two ranges?

This bring back the first, I now would like to bring back the last
=INDEX(E22:J22,MATCH(1,INDEX((COUNTIF(\$R\$2:\$R\$17,E22:J22)>0)+0,0),0))
LVL 5
###### Who is Participating?

Microsoft MVP ExcelCommented:
see attached
Book3.xlsx
0

Microsoft MVP ExcelCommented:
Hello,

like this:

=INDEX(E22:J22,MATCH(1,INDEX((COUNTIF(\$R\$2:\$R\$17,E22:J22)>0)+0,0),1))

cheers, teylyn
0

Author Commented:
112113

2
0
0
0
3

If I was looking for a true value it would be the last true value, not the first.  In this case it would be 3
0

Microsoft MVP ExcelCommented:
My formula is different from yours. Have you tried it?
0

Microsoft MVP ExcelCommented:
It might help to see your data. This one also works in my tests

=INDEX(E22:J22,MATCH(2,INDEX((COUNTIF(\$R\$2:\$R\$17,E22:J22)>0)+0,0),1))
0

Microsoft MVP ExcelCommented:
The formula I suggested works, as is demonstrated in the file attached in comment 36546342.
Suggest to accept that as the solution.
0

Commented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.