cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Catch Left number before "-"

Hi All,

 

Maybe this is a easy question to answer, but I'm struggling to get the left number before the "-" sign.

 

Example: 324556432 - A Text

 

Only want the number, it's not fixed based length.

 

Thank You

Joao  

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

@jlivio 

Here's the code if you want the output to be a text type.

Left("324556432 - A Text", Find(" - ",A1)-1))

 

Or to have the output type as number add VALUE to the formula.

Value(Left("324556432 - A Text", Find(" - ",A1)-1)))

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

View solution in original post

5 REPLIES 5
Highlighted
Super User III
Super User III

@jlivio 

Here's the code if you want the output to be a text type.

Left("324556432 - A Text", Find(" - ",A1)-1))

 

Or to have the output type as number add VALUE to the formula.

Value(Left("324556432 - A Text", Find(" - ",A1)-1)))

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

View solution in original post

Highlighted

Thanks

Highlighted

@jtlivio @jlivio 

Please mark as the solution

Highlighted

Option not available in Cellphone mode, only reply or kudo. I’ll when in desktop 

Highlighted

@jtlivio @jlivio 

No worries.  I did it.  Just usually don't want to mark my own for ethical purposes but since you said its OK.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,141)