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:
crazygirl la Simpatie.ro
Femeie
24 ani
Buzau
cauta Barbat
26 - 80 ani
Mrrrr's Forum (VIEW ONLY)ReguliInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides /

[EXCEL] Extract Number From String

Pagini: 1 Moderat de TRaP, TonyTzu
pus acum 4 luni#1
TRaP
Moderator
Postari: 960
Key words: extract number numeric value

I have a bunch of strings containing numbers and letters (letters only after numbers), or only numbers stored as strings (which appear after the 2nd occurrence of "X").

E.g.:
- only numeric strings: 6, 100, 12, 300 etc. which I could simply convert to number using VALUE function
- number + letters strings: 12R, 100BR, 100R, 12BR, 450G and so on, many different letters at the end of the numbers


=LET(
  txt; TEXTAFTER(A5;"X";2;1;1);
  err; ISERROR(txt);
  chars; IF(err=FALSE;MID(txt;SEQUENCE(LEN(txt));1));
  numPart; TEXTJOIN(""; TRUE; IF(ISNUMBER(--chars);chars;""));
  IFERROR(VALUE(numPart);"different code format")
)


Source: ChatGPT


 
   
Pagini: 1  
Mergi la