Python solution to Excel Challenge -Is the string sorted?

Поделиться
HTML-код
  • Опубликовано: 9 окт 2023
  • is the string sorted excel? This solution uses python in Excel and shows a few tips for using python. In this Excel challenge, we filter out strings that are sorted(i.e the characters of the string/word are in alphabetical order). Sort the string alphabetically and compare with the string itself to know if it is sorted or not.
    Workbook link: 1drv.ms/x/s!AjKsNBbkfPQnznfxf...

Комментарии • 14

  • @ziggle314
    @ziggle314 9 месяцев назад +2

    Always useful to show multiple ways of solving the same problem. Python is going to be a game changer. Thanks.

    • @ExcelMoments
      @ExcelMoments  9 месяцев назад

      Absolutely. These days, there has to be more than one way to solve an excel problem

  • @IvanCortinas_ES
    @IvanCortinas_ES 9 месяцев назад +1

    Brilliant and impressive, as always. Certainly Python proves to be a high-level language that condenses the formulas compared to what is achieved with Excel. Thanks Victor, for this great demonstration of "syntax sugar".

    • @ExcelMoments
      @ExcelMoments  9 месяцев назад +1

      Thanks Ivan for your comments and yes, I called it syntax sugar 😁😁

  • @stevereed5776
    @stevereed5776 9 месяцев назад +1

    Just getting used to the new LAMDA formulas in Excel, not sure I can handle Python as well!! Interesting to see though, thanks Victor

    • @ExcelMoments
      @ExcelMoments  9 месяцев назад +1

      I will keep it as a separate playlist, so for most problems I probably would still have the formula(likely LAMBDA solutions) which maybe what most people can assimilate at this time

  • @jazzista1967
    @jazzista1967 9 месяцев назад +1

    HI Victor... Just got python in my excel 365 last Sunday. I will play around with your example. Python seems very intimidating to learn but i will give it a try. Thanks for posting.

    • @ExcelMoments
      @ExcelMoments  9 месяцев назад

      If you can write lambdas, then you are probably already ahead of the curve. So you are in good hands 😁

    • @jazzista1967
      @jazzista1967 9 месяцев назад +1

      haha! Victor... Thanks to you and your videos on Lambda helper functions . Those are epic!

    • @ExcelMoments
      @ExcelMoments  9 месяцев назад

      @jazzista1967 Thanks Luis. I am glad you have found them helpful in your LAMBDA journey

  • @spilledgraphics
    @spilledgraphics 9 месяцев назад +1

    First comment. 😁 (If Diarmuid reads it)

    • @ExcelMoments
      @ExcelMoments  9 месяцев назад

      Still trying to crack the Diarmuid 😁😁

  • @Softwaretrain
    @Softwaretrain 9 месяцев назад +2

    Great,
    To be a little shorter, it could be as below:
    [x for x in xl("A2:A10")[0] if x==''.join(sorted(x))]

    • @ExcelMoments
      @ExcelMoments  9 месяцев назад +1

      Absolutely. If I wanted to totally finish them off 😁😁