Results 1 to 20 of 27

Thread: How to list dates defined by a data validation process

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #13
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,970
    Quote Originally Posted by Aussiebear View Post
    Your right Paul, as when I changed the temp value to 25, it had a wobbly and threw Calc errors as well.
    That value doesn't matter showing an error, in fact it's useful, since it occurs when there are no opportunity dates and so leads to the errors in column F which errors are not charted. Perfect.

    Quote Originally Posted by Aussiebear View Post
    @P45cal. The following formulas could be secret rocket launch codes for all I know. Just exactly what do they mean, and remember you are speaking with a convict here so go gently with the wording.
    =VALUE(TEXTSPLIT(TEXTJOIN("¬",TRUE,BYROW(R36#,LAMBDA(i,TEXTJOIN("¬",TRUE,SEQUENCE(,TAKE(i,,1),TAKE(i,,-1)))))),,"¬",TRUE))
    and
    =VALUE(TEXTSPLIT(TEXTJOIN("¬",TRUE,BYROW(R36#,LAMBDA(i,TEXTJOIN("¬",TRUE,SEQUENCE(,TAKE(i,,1),TAKE(i,,-1)))))),Table1__2[@Date],"¬",TRUE))
    Having opted to use BYROW, it's a pain to work with since it won't output data spilling into different numbers of cells for each row (it won't produce a jagged array), so I elected to make its output one cell per row by using TEXTJOIN, then used it again to put all the results into a single (virtual) cell, then later I used TEXTSPLIT to break that cell out into the individual dates in a single column. Untidy. Convoluted. Not good.

    Quote Originally Posted by Aussiebear View Post
    and this one is
    =LAMBDA(myDates,maxes,celsius,LET(g,SORT(FILTER(myDates,ABS(maxes-celsius)<=1)),f,SORT(g)-SEQUENCE(COUNT(g)), _
    e,UNIQUE(f),c,DROP(FREQUENCY(f,e),-1),d,XLOOKUP(e,f,g),b,FILTER(HSTACK(c,d),c>=3),result,TEXTSPLIT(TEXTJOIN("¬",TRUE, _
    BYROW(b,LAMBDA(i,TEXTJOIN("¬",TRUE,SEQUENCE(,TAKE(i,,1),TAKE(i,,-1)))))),,"¬",TRUE),b))(A2:A78,B2:B78,Temperature)
    Well, I'm not going to go into lengthy explanations of each of the newish functions I've used; it took long enough to put them together in the first place!
    In the attached, I've done some step by step columns in columns R:AQ, starting with the original lambda in cell P3. Hopefully this will break it down enough for you?

    Quote Originally Posted by Aussiebear View Post
    and before you get started what the hell is this? "¬". What was it meant to be before it got smashed by a truck?
    It's a delimiter I used to split and join text. I use a rare character (one that's unlikely to occur in the source data to avoid splitting things in the wrong place). It's a habit, and in this case didn't need it; it could've been just a space.
    Attached Files Attached Files
    Last edited by p45cal; 03-18-2024 at 09:05 AM.
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •