• 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.

Select only words with an accent

deciog

Active Member
Gentlemen, good morning.

I need all accented words from this column to be extracted and copied to another adjacent column as per Template

Important only in formulas.

Thank you very much in advance

Hugs
 

Attachments

  • Modelo.xlsx
    10.5 KB · Views: 12
Bosco

I didn't know this ENCODEURL function, it's great,
Thank you very much, it worked perfectly

A big hug

Decio
 
I set out to solve the challenge using CODE to pick out characters later than "z" and wrapping the core calculations within Lambda functions.
First though, I tried Bosco's ingenious idea of using ENCODEURL.. Sadly, I forgot the 'space' character, but one can't get it right every time!

I started with the explode function that splits a string into individual characters,
Code:
Explodeλ
= LAMBDA(string,
     MID(string,
        SEQUENCE(1,LEN(string)),
     1)
  );
It should be a built-in function in its own right, or included within TEXTSPLIT, but sadly it's not. Then I used the function within ,HasAccentλ, to test whether an accented character appears within each word.
Code:
HasAccentλ
= LAMBDA(name,
    OR(CODE(Explodeλ(name))>122)
  );
Finally, a further Lambda to MAP the list to individual words and apply the FILTER. I tried to look up 'accented' in Portuguese but it may mean 'sounds like a Mexican citizen' rather than 'is an accented character'.
Code:
Acentuadoλ
= LAMBDA(list,
    FILTER(list, MAP(list, HasAccentλ))
  );
With that, the worksheet formula was
Code:
= Acentuadoλ(list)
 

Attachments

  • Modelo.xlsx
    16.7 KB · Views: 1
Bosco, good morning.

It also worked perfectly

Thanks

Peter, Good morning.

I really enjoyed seeing the sequence for the solution of the result

Worked perfectly

Thanks

Decio
 
Bosco, really, "ENCODEURL" ? = :awesome:
@GraH - Guido , @deciog

For your more understand of ENCODEURL function, I give a simple example as follow:

To extract number from a string taken from web [ that mean text contains web blank Char(160) ]

1] In A3, enter: ="42000"&CHAR(160)&"Discounts given"

2] Formula 1 in B2: =0+LEFT(A2,FIND(" ",A2)-1)

3] Formula 2 in C2: =0+LEFT(A2,FIND("%",ENCODEURL(A2))-1)

4] B3, return "#VALUE!"

81358
 

Attachments

  • ENCODEURL example.xlsx
    9.7 KB · Views: 4
Last edited:
Back
Top