Forum Discussion

kelvindjangang's avatar
kelvindjangang
Copper Contributor
Jul 31, 2024

split or create a funtion

hello everyone, i have a problem to put automaticaly range of daily works, and that is slowly to me

So that I want to create a function or have help how to do it.

like in semaine 53  = I want to that equals to 02/09/24-10/10/24 without describing all the words

@sana

 

13 Replies

  • NikolinoDE's avatar
    NikolinoDE
    Gold Contributor

    kelvindjangang 

    I'm not sure if this is what is meant, but here is a simple example in the attached file that should work in all versions of Excel, since there is no information about the version.

     

    My answers are voluntary and without guarantee!

     

    Hope this will help you.

     

    Was the answer useful? Mark as best response and like it!

    This will help all forum participants.

     

  • kelvindjangang 

    How about

    =LET(Sep_1, DATE(YEAR(TODAY())-(MONTH(TODAY())<9), 9, 1), Wk, TEXTAFTER(A2, " "), Dt, Sep_1+7*Wk, Mon, Dt-WEEKDAY(Dt, 3), Sun, Mon+6, TEXT(Mon, "dd/mm/yy")&"-"&TEXT(Sun, "dd/mm/yy"))

     

    =LET(Sep_1; DATE(ANNEE(AUJOURDHUI())-(MOIS(AUJOURDHUI())<9); 9; 1); Wk; TEXTE.APRES(A2; " "); Dt; Sep_1+7*Wk; Mon; Dt-JOURSEM(Dt; 3); Sun; Mon+6; TEXTE(Mon; "jj/mm/aa")&"-"&TEXTE(Sun; "jj/mm/aa"))

  • Tejas_shah's avatar
    Tejas_shah
    Brass Contributor

    kelvindjangang 

     

    Above all date range has 6 days difference but for 53 you different logic. If logic remain same than you can use the below formula.

     

    =LET(dt,RIGHT(M7,8),TEXT(dt+1,"dd/MM/YY")&"-"&TEXT(dt+7,"dd/mm/yy"))

     

     

Resources