seansanexcel
New Member
- Joined
- Mar 26, 2012
- Messages
- 3
we have an interesting formula to figure out.
First, we count the following, where MYDATE needs to fall between the two dates. REGISTER.DT and EXIT.DT are both named ranges A:A and B:B, MYDATE is a named range that points at C1
Now for the question. The above formule returns 2 (so it finds two dates)
We now want to find and show these dates in a concatenated string
I have been fiddling with a VBA function StringConcat that I found online, but i doesnt skip zeros (converts all to string), but also doenst understand named ranges.
Anyone have hint? or a Matrix function lookup that could work?
many thanks
First, we count the following, where MYDATE needs to fall between the two dates. REGISTER.DT and EXIT.DT are both named ranges A:A and B:B, MYDATE is a named range that points at C1
Code:
=SUMPRODUCT(--(REGISTER.DT<=MYDATE)*(EXIT.DT>=MYDATE))
Now for the question. The above formule returns 2 (so it finds two dates)
We now want to find and show these dates in a concatenated string
I have been fiddling with a VBA function StringConcat that I found online, but i doesnt skip zeros (converts all to string), but also doenst understand named ranges.
Anyone have hint? or a Matrix function lookup that could work?
many thanks