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

Formula to extract the number or numbers before a character

Pasadu

Member
Sir, Please I want a formula where i could extract the number or numbers before the character "X" in a cell.
My Excel version is Microsoft Office Professional Plus 2016

80680
Thank You.
 

Attachments

  • Extract Number before character.xlsx
    9.3 KB · Views: 6
Last edited:
Hi
If your version office 365 insider , you can use TEXTBEFORE function.
or
E16 >>> =LEFT(D16,search("x",D16)-1) copy formula down
 
Last edited:
An alternative is with Power Query which is found on the Data Tab and called Get and Transform Data

Code:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Inserted Text Before Delimiter" = Table.AddColumn(Source, "Text Before Delimiter", each Text.BeforeDelimiter([PRODUCT], "X"), type text)
in
    #"Inserted Text Before Delimiter"
 
Back
Top