Forum Discussion

Archie_Harray's avatar
Archie_Harray
Copper Contributor
Jan 01, 2026

Hi, I need help. I'm creating a calendar, based on events at our farm, which are on different dates.

Each event has its own column, the name of the event is at the top of the column, and the different dates it will occur are listed underneath it. I need to get this event name to automatically appear on an interactive calendar I made in the next sheet. (The calendar shows the date and weekday of a certain month in a certain year, you can change the month and year to whenever you want), I've tried the xlookup functions but I can't seem to get it working.

Please help if you can! I'd be happy to take advice.

6 Replies

  • mathetes's avatar
    mathetes
    Gold Contributor

    I've saved your file, for further study. You did to the raw data exactly what I would have done, but my goodness, the rest of that, in creating the calendar and filling it: you used Excel features I still need to learn.

  • mathetes's avatar
    mathetes
    Gold Contributor

    As always, m_tarler​ is better at reading minds :;-), and, for that matter, at constructing solutions. Well done, my friend.

    • m_tarler's avatar
      m_tarler
      Bronze Contributor

      You're too kind, we'll have to see if I'm reading minds or writting fiction ;)

  • m_tarler's avatar
    m_tarler
    Bronze Contributor

    As always, mathetes​ is right that we are really guessing here and attaching a sample sheet or hosting one online (e.g. onedrive or google drive) would be a huge help.  Based on your description I'm taking a guess and agree again with mathetes that your data format is the problem.  So my guess is you have a sheet something like this:

    which is the problem so I created a helper sheet I called 'Dates' and converted the above to a more functional format with a date column followed by the event names:

    by the way the formula I used was:

    =LET(in,Events!B1:.Z99,c,COLUMNS(in),
    list,REDUCE(HSTACK("Date","Event"),SEQUENCE(c),LAMBDA(p,q,VSTACK(p,EXPAND(DROP(CHOOSECOLS(in,q),1),,2,INDEX(in,1,q))))),
    VSTACK(TAKE(list,1),SORT(DROP(FILTER(list,TAKE(list,,1)<>0),1))))

    then i created a calendar like this:

    where the box under each date used a formula like this formula which was in B7 (under the day 6 box):

    =TEXTJOIN(CHAR(10),1,FILTER(TAKE(Dates!$A$1#,,-1),TAKE(Dates!$A$1#,,1)=B6,""))

    I will try to attach the sample file separately

  • mathetes's avatar
    mathetes
    Gold Contributor

    There are a lot of folks who could help. You'd help us help you by providing a bit more in the way of description of the raw data and what you expect the output to look like. Is that calendar, for example, expected to show only ONE DAY of the specified month and year? Or a week's worth of days; or a month's worth? 

    My suspicion is that you'll need to arrange the raw data differently than you describe it, but it would be easier to help, as suggested above, if you were to show us a healthy sample of the raw data, even as you've got it arranged now. 

    (Otherwise you're asking us to create the whole process based on a lot of guesses; you don't even give examples of how many different "events" there are, and what names are associated with them.)

     

Resources