cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KLaurent
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
Adrian_Celis
Super User
Super User

Hi @KLaurent 

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)

 

View solution in original post

2 REPLIES 2
Adrian_Celis
Super User
Super User

Hi @KLaurent 

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)

 

Hello @Adrian_Celis 

 

Thank you very much !

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,479)