Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Grab string at first number

Featured Replies

Purpose: Grab all of the field starting at the first number. Examples are:

CSR2400882A (result should be 2400882A)

3266427 (result should be 3266427)

CHSZzSTVa241CRMC (result should be 241CRMC)

Here's what I currently have (result is text)B)

Let ( [

num = Substitute ( text ; [ 0 ; "~" ] ; [ 1 ; "~" ] ; [ 2 ; "~" ] ;[ 3 ; "~" ] ; [ 4 ; "~" ] ; [ 5 ; "~" ] ; [ 6 ; "~" ] ; [ 7 ; "~" ] ; [ 8 ; "~" ] ; [ 9 ; "~" ] ) ;

pos = Position ( num ; "~" ; 1 ; 1 )

] ;

Right ( text ; Length ( text ) - pos + 1 )

)

... I know, I know ... but I couldn't figure out how to best approach it (obviously). I could also use Middle ( text ; pos ; Length ( text )) but can I eliminate the substitution portion to identify each number? That part is so long and ugly! Sometimes my brain can't find elegance if it slapped me on the forehead!

UPDATE: I originally had the string in rows down the page but I thought it wouldn't look so twisted if it was all together. It still looks twisted. :crazy2:

LaRetta

Edited by Guest
Added update

  • Author

Let ( [

num = Substitute ( text ; [ 0 ; 1 ] ; [ 1 ; 1 ] ; [ 2 ; 1 ] ;[ 3 ; 1 ] ; [ 4 ; 1 ] ; [ 5 ; 1 ] ; [ 6 ; 1 ] ; [ 7 ; 1 ] ; [ 8 ; 1 ] ; [ 9 ; 1 ] ) ;

pos = Position ( num ; 1 ; 1 ; 1 )

] ;

Right ( text ; Length ( text ) - pos + 1 )

)

Okay, changing the tilde to a 1 makes it smaller but it STILL looks twisted. Please save me from myself ... I KNOW I should be able to combine those numbers and find the starting position of them in one whack (and without a CF), right?

Edited by Guest
Changed sentence

Hello,

Perhaps with "Filter" ? B)

let ([

Num = Filter ( Text ; "0123456789" ) ;

Pos = Position ( Text ; Left ( Num ; 1 ) ; 1 ; 1 )

];

Middle ( Text ; Pos ; Length ( Text ) )

)

Agnes

  • Author

Of Course!! Thank you! It felt like the easy answer was on the tip of my tongue and I just couldn't find it! DOH! Thanks for putting me out of my misery, Agnes! :waytogo:

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.