cancel
Showing results for
Did you mean:
Frequent Visitor

## Extract few digits from a longer number

Hello,

i would like to extract few digits from a longer number.

For exemple :

i have that number : 0207613031466050420001523033148721010650914PB

and i want to separate like that :

02

076130314660504

20

00

15

230331

4872

10

10650914PB

Thank you for your help ! 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
Memorable Member

You can use Left, Mid, and Right functions to extract a portion of a string.

For example we put the sample number combination into a variable named 'varNumber'

``Set(varNumber,"0207613031466050420001523033148721010650914PB")``

If the length of the numbers is always going to be fixed, then you can use this formulas, respectively :

``Left(varNumber,2)``
``Mid(varNumber,3,15)``
``Mid(varNumber,18,2)``
``Mid(varNumber,20,2)``
``Mid(varNumber,22,2)``
``Mid(varNumber,24,6)``
``Mid(varNumber,30,4)``
``Mid(varNumber,34,2)``
``Right(varNumber,10)``

2 REPLIES 2
Memorable Member

You can use Left, Mid, and Right functions to extract a portion of a string.

For example we put the sample number combination into a variable named 'varNumber'

``Set(varNumber,"0207613031466050420001523033148721010650914PB")``

If the length of the numbers is always going to be fixed, then you can use this formulas, respectively :

``Left(varNumber,2)``
``Mid(varNumber,3,15)``
``Mid(varNumber,18,2)``
``Mid(varNumber,20,2)``
``Mid(varNumber,22,2)``
``Mid(varNumber,24,6)``
``Mid(varNumber,30,4)``
``Mid(varNumber,34,2)``
``Right(varNumber,10)``

Frequent Visitor

Thank you very much !

Announcements

#### Celebrating the May Super User of the Month: Laurens Martens

@LaurensM  is an exceptional contributor to the Power Platform Community. Super Users like Laurens inspire others through their example, encouragement, and active participation. We are excited to celebrated Laurens as our Super User of the Month for May 2024.   Consistent Engagement:  He consistently engages with the community by answering forum questions, sharing insights, and providing solutions. Laurens dedication helps other users find answers and overcome challenges.   Community Expertise: As a Super User, Laurens plays a crucial role in maintaining a knowledge sharing environment. Always ensuring a positive experience for everyone.   Leadership: He shares valuable insights on community growth, engagement, and future trends. Their contributions help shape the Power Platform Community.   Congratulations, Laurens Martens, for your outstanding work! Keep inspiring others and making a difference in the community!   Keep up the fantastic work!

#### Announcing Power Apps Copilot Cookbook Gallery

We are excited to share that the all-new Copilot Cookbook Gallery for Power Apps is now available in the Power Apps Community, full of tips and tricks on how to best use Microsoft Copilot as you develop and create in Power Apps. The new Copilot Cookbook is your go-to resource when you need inspiration--or when you're stuck--and aren't sure how to best partner with Copilot while creating apps.   Whether you're looking for the best prompts or just want to know about responsible AI use, visit Copilot Cookbook for regular updates you can rely on--while also serving up some of your greatest tips and tricks for the Community. Check Out the new Copilot Cookbook for Power Apps today: Copilot Cookbook - Power Platform Community.  We can't wait to see what you "cook" up!