Lookup based on criteria in named range, then concatenate results

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

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
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
{=StringConcat((AANM.DT>=DT.START)*(AANM.DT<=DT.EIND)*(TYPE.TXT=I8)*MVAR)}

Where AANM.DT is a named ranges with dates

Where DT.START and DT.EIND are named ranges pointing to 1 cell, a variable

TYPE.TXT and I8 are strings to match, TYPE.TXT is range containing the variables to check I8 against

MVAR is the variable we want to concatenate based on TRUE, FALSES in the previous array criteria filters

Result now is
Code:
#VALUE
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,988
Members
452,373
Latest member
TimReeks

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