Preskoči na glavno vsebino

Kako povleči ali izvleči znake od desne proti levi v celici, dokler v Excelu ni prostora?

V tem članku bomo govorili o vlečenju ali izvlečenju znakov z desne strani v celici, dokler ne bo na voljo prostora za naslednji rezultat na Excelovem delovnem listu. Koristna formula v tem članku lahko to nalogo reši hitro in enostavno.

Povlecite ali izvlecite znake desno od celice, dokler ne pride do presledka s formulo


Povlecite ali izvlecite znake desno od celice, dokler ne pride do presledka s formulo

Tukaj je preprosta formula, ki vam lahko pomaga izvleči znake iz desne celice, dokler ni presledka, naredite tako:

Vnesite to formulo: = TRIM (DESNO (NAMESTITEV (A2, "", REPT ("", 255)), 255)) v prazno celico, kjer želite dobiti rezultat, in nato povlecite ročico za polnjenje navzdol do celic, ki jih želite izpolniti s to formulo, in vsi znaki od desne strani v celicah, ko se srečate s prvim prostorom, so naenkrat ekstrahirani, glejte posnetek zaslona:

Najboljša pisarniška orodja za produktivnost

🤖 Kutools AI Aide: Revolucionirajte analizo podatkov na podlagi: Inteligentna izvedba   |  Ustvari kodo  |  Ustvarite formule po meri  |  Analizirajte podatke in ustvarite grafikone  |  Prikličite funkcije Kutools...
Priljubljene funkcije: Poiščite, označite ali identificirajte dvojnike   |  Izbriši prazne vrstice   |  Združite stolpce ali celice brez izgube podatkov   |   Krog brez formule ...
Super iskanje: Več kriterijev VLookup    Multiple Value VLookup  |   VLookup na več listih   |   Nejasno iskanje ....
Napredni spustni seznam: Hitro ustvarite spustni seznam   |  Odvisni spustni seznam   |  Večkrat izberite spustni seznam ....
Upravitelj stolpcev: Dodajte določeno število stolpcev  |  Premakni stolpce  |  Preklop stanja vidnosti skritih stolpcev  |  Primerjaj obsege in stolpce ...
Predstavljene funkcije: Mrežni fokus   |  Pogled oblikovanja   |   Velika vrstica formule    Upravitelj delovnih zvezkov in listov   |  Knjižnica virov (Samodejno besedilo)   |  Izbirnik datuma   |  Združite delovne liste   |  Šifriranje/dešifriranje celic    Pošljite e-pošto po seznamu   |  Super filter   |   Poseben filter (filter krepko/ležeče/prečrtano ...) ...
15 najboljših kompletov orodij12 Besedilo Orodja (dodajanje besedila, Odstrani znake,...)   |   50 + Graf Vrste (Gantt Chart,...)   |   40+ Praktično Formule (Izračunajte starost glede na rojstni dan,...)   |   19 vstavljanje Orodja (Vstavite kodo QR, Vstavi sliko s poti,...)   |   12 Pretvorba Orodja (Številke v besede, Pretvorba valut,...)   |   7 Spoji in razdeli Orodja (Napredne kombinirane vrstice, Razdeljene celice,...)   |   ... in več

Napolnite svoje Excelove spretnosti s Kutools za Excel in izkusite učinkovitost kot še nikoli prej. Kutools za Excel ponuja več kot 300 naprednih funkcij za povečanje produktivnosti in prihranek časa.  Kliknite tukaj, če želite pridobiti funkcijo, ki jo najbolj potrebujete...

Opis


Kartica Office prinaša vmesnik z zavihki v Office in poenostavi vaše delo

  • Omogočite urejanje in branje z zavihki v Wordu, Excelu, PowerPointu, Publisher, Access, Visio in Project.
  • Odprite in ustvarite več dokumentov v novih zavihkih istega okna in ne v novih oknih.
  • Poveča vašo produktivnost za 50%in vsak dan zmanjša na stotine klikov miške za vas!
Comments (17)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
This is a nice piece of formula,
I took liberty to change it and it worked for me.

Considering your data between two spaces is not more than 20 characters and you need data between spaces try this.

Original Formula for last space to end
=TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",255)),255))


Between 2nd last space and last space
=TRIM(LEFT(RIGHT(SUBSTITUTE(C1," ",REPT(" ",25)),50),25))


Between 3rd last space and 2nd last space

=TRIM(LEFT(RIGHT(SUBSTITUTE(C1," ",REPT(" ",25)),50),25))
This comment was minimized by the moderator on the site
si, solo tienes que cambiar el numero en negrella a 2 de la formula "=EXTRAE(A5;ENCONTRAR("@";SUSTITUIR(A5;" ";"@";LARGO(A5)-LARGO(SUSTITUIR(A5;" ";""))-1))+1;100)"
This comment was minimized by the moderator on the site
Hi, thanks so much for the help! Is there any way to do the same thing, but to pull out text from right to left until the THIRD space? It would save my life!!!!
This comment was minimized by the moderator on the site
Hello, santos
To extract the text from right to left until the THIRD space, please apply the below formula:
=IF((LEN(A1)-LEN(SUBSTITUTE(A1," ","")))<3, A1, RIGHT(A1,LEN(A1)-FIND("/", SUBSTITUTE(A1," ","/", (LEN(A1)-LEN(SUBSTITUTE(A1," ",""))-2)))))


Please have a try, hope it can help you!
This comment was minimized by the moderator on the site
I am using a similar formula =TRIM(RIGHT(SUBSTITUTE(F7," ",REPT(" ",255)),255)) which is copying the word to G7, however I would like it to remove the word from F7. Are you able to assist me with what I need to adjust in my formula?
This comment was minimized by the moderator on the site
This is a great formula. I would love to understand the individual parts a bit better. Could someone provide a bit of a summary as to what each part is doing?
TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",255)),255))
This comment was minimized by the moderator on the site
Explanation of TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",255)),255))

TLDR: pad the space before the last character(s) on the right with 255 spaces, extract 255 characters from the right, then trim the space characters, leaving the desired non-text characters.

Long explanation:
1. REPT (Repeat) is adding 255 space characters. WHY? These added spaces will be inserted by SUBSTITUE.
2. SUBSTITUTE is replacing each space characters with 255 spaces (provided by REPT). WHY? This causes a cell to contain the desired characters on the right, plus 255 space characters to the left of the desired cell characters; this will be exploited by the RIGHT extraction function.
3. RIGHT is extracting the first 255 characters from the right. WHY? This extracts the desired characters on the right plus the added space characters (up to 255 characters) inserted by SUBSTITUTE.
4. TRIM is removing all space characters. WHY? This leaves only the desired characters on the right.


Caveat: This formula only works so long as the desired right text characters are <=255 characters. If the desired right text characters are >256, then the RIGHT function will miss the characters over 255.
This comment was minimized by the moderator on the site
Hi,
I had to put a Trim(A2) into mine as I had trailing blanks - otherwise works great.
This comment was minimized by the moderator on the site
Is there a way to extract and the result be read as a number? I am extracting the number part of an exported column that excel is reading as text. Thanks!
This comment was minimized by the moderator on the site
Hello, Russell,
If you need the result as number format, you should copy and paste the formula cells into other cells as values, and then convert the text format number to real number.
This comment was minimized by the moderator on the site
thanks a lot
This comment was minimized by the moderator on the site
This formula worked perfectly:
=TRIM(RIGHT(SUBSTITUTE(A2," ",REPT(" ",255)),255))

Is there any way to do the same thing, but to pullout text from right to left untill the SECOND space?
This comment was minimized by the moderator on the site
Hi, Paulius,
To extract the text from right to left until the second space, you should apply the below formula:
=MID(A2,FIND("@",SUBSTITUTE(A2," ","@",LEN(A2)-LEN(SUBSTITUTE(A2," ",""))-1))+1,100)

Please try, hope it can help you!
This comment was minimized by the moderator on the site
Thank you!!!!!!!!!!
This comment was minimized by the moderator on the site
Thank You it worked perfectly
This comment was minimized by the moderator on the site
Thank you so much! Saved me a ton of time!
This comment was minimized by the moderator on the site
This is close to what I need help with so I'm hoping someone can help. I need to pull over 20 characters or until the next space. how can I modify the formulas above to do that?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations