• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Selecting date come data

For those who can use 365, XLOOKUP will return a column as a range reference. That allows the developer to use CONTIFS to count the instances of "WOFF", just as did @bosco_yip and @vletm.
Code:
= COUNTIFS(TL, distinctTL, XLOOKUP(selectedDate,dates,data), "WOFF")
Then again, one could get more ambitious and combine the count with the process of drawing up a list of distinct TLs as a single dynamic range
Code:
= WOFFλ(selectedDate)

where

WOFFλ = LAMBDA(d,
   LET(
      distinctTL, SORT(UNIQUE(TL)),
      dataDay, XLOOKUP(d,dates,data),
      WOFF, COUNTIFS(TL, distinctTL, dataDay, "WOFF"),
      HSTACK(distinctTL, WOFF)
   )
);
 

Attachments

  • Date Selection.xlsx
    32.8 KB · Views: 5
Back
Top