Hi guys,
I'm looking to match a date to a date range and then return the respective header of that date range.
Please look at the attached file.
Thanks!
Hi guys,
I'm looking to match a date to a date range and then return the respective header of that date range.
Please look at the attached file.
Thanks!
I went with this:
=INDEX(A1:A13,SUMPRODUCT((B2:B13<=E3)*(C2:C13>=E3)*(ROW(A2:A13))))
Make Mom proud: Add to my reputation if I helped out!
Make the Moderators happy: Mark the Thread as Solved if your question was answered!
I wonder if it's just coincidence that the place where you entered the 'test date' was the same row that matched your range? You don't say if you have any VBA coding experience or not, so it's hard to know exactly how to help you (as opposed to doing your work for you )
You might want to try something along the lines of:
OTOH, if that makes as much sense as a recipe written in Urdu, then you probably need to get some reading done.Please Login or Register to view this content.
The problem you are facing is:
It's a simple while loop, and shouldn't take too long to figure out. However, if you are a newbie to coding, you'd be better off doing some reading first!Please Login or Register to view this content.
HTH
Tony
This array* formula in F3:
=IFERROR(INDEX($A$2:$A$13,MIN(IF((E3>=$B$2:$B$13)*(E3<=$C$2:$C$13),ROW($B$2:$B$13)-1))),"")
seems to do the trick.
*Use Ctrl-Shift-Enter to commit an array formula, rather than the usual <Enter>.
Hope this helps.
Pete
daffodil11's formula works well.
Pete_UK: Your formula when used on larger population is not correct in some cases. Thank you so much, though, for the formula. I appreciate it.
Awesome, I did good stuff. Thanks for feedback.
Mom will be so proud.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks