Filehost.ro - gazduire fisiere
Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Nou pe simpatie:
ro_xy20
Femeie
24 ani
Bucuresti
cauta Barbat
24 - 45 ani
Mrrrr's Forum (VIEW ONLY)InregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides /

[EXCEL] Add Characters in Front or After Text in Cell

Pagini: 1 Moderat de TRaP, TonyTzu
pus acum 23 ore#1
TRaP
Moderator
Postari: 972
Similar to this in Power Query: https://mrrrr.3xforum.ro/post/2833/POWE ... in_Column/

Want to add zeroes in front of text in cell if text length is less than 10 characters?

=TEXT(A1;"0000000000")

or

This replicates the formula from Power Query:

=RIGHT(REPT("0";10)&A1;10)

or

Create reusable LAMBDA function, name it e.g., PADSTART:

=LAMBDA(value;length;[character];
    LET(
        txt;value&"";
        pad;IF(ISOMITTED(character);"0";character);
        LEFT(REPT(pad;length)&txt;0)&REPT(pad;MAX(0;length-LEN(txt)))&txt
    )
)

With 0 as default character and optional character to replace 0 with:

=PADSTART(A1;10)

or

=PADSTART(A1;10;"X")


Source: ChatGPT


 
   
Pagini: 1  
Mergi la