Search code examples
google-sheetsformula

How to have VLOOKUP pull multiple instances?


I currently have a sheet where I'm organizing launches. SAMPLE

Currently I have a overview sheet and a calendar sheet which pulls from the overview sheet according to date and event type.

=iferror(VLOOKUP(B$3&" "&$A4,Sheet1!$A:$D,4,0),"")

However, when there are multiple "TITLE EVENTS" on a single day, I have to create separate rows w/ "TITLE EVENTS 2" and "TITLE EVENTS 3" in order for VLOOKUP to differentiate and show all instances of title events on the calendar.

Is there a way (may be a lot more complicated) where I can just have a single "TITLE EVENTS" selection and have the sheet be able to create a new row under "TITLE EVENTS" on its own? (ideal look on sheet 3).


Solution

  • A more elegant option:

    See here

    =IFERROR(ARRAY_CONSTRAIN(FILTER('Date Registry'!$D:$D, ('Date Registry'!$A:$A)=(H$3&" "&$A5)), 4, 1), "")
    

    Formatted:

    =IFERROR(
        ARRAY_CONSTRAIN(
            FILTER('Date Registry'!$D:$D,  ('Date Registry'!$A:$A)=(H$3&" "&$A5)),
        4, 1)
    , "")