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

Remove Text from left and the right

Featured Replies

I have 10K+ records with a fields holding values similar to these;

AAA_02_1234

AAA_102_3456

AAA_5102_9876

AAA_7_HAMBERGER

ZZZ_22_12346

ZZZ_442_12346

PCDD_18_05

The majority of them follow a certain structure but the only thing absolute about all of them are the "_" (underscores). I'm trying to extract just the numbers between the underscores but I'm not having much luck. I'm trying two work with this Let function and was hoping for a little help. Right now it works to remove the first set of letter and the first underscore. I can't seem to get it to remove the last string and underscore.




Let ( [ 

len = Length ( Lab_No ) ; 

pos = Position  (Lab_No ; "_" ; 1 ;1) ;

pos2 = Position  (Lab_No ; "_" ; 1 ;2) ; 

pos2len = Length (Lab_No) - pos2 ] ;



Right ( Lab_No ; len - pos )

)

I added pos2len but I'm not using it and I'm not sure I even need it.

TIA.

Try:


Let ( [

start = Position ( Lab_No ; "_" ; 1 ; 1 ) + 1 ;

end = Position ( Lab_No ; "_" ; 1 ; 2 ) 

] ;

Middle ( Lab_No ; start ; end - start )

)

why not just

MiddleWords ( Lab_No ; 2 ; 1 )

Lee

  • Author

Thank you both very much.

Each worked but I'll have to say after looking over the results of each calc the first solution with the Let, start end... discovered a few errors in the original Lab_No, which will help improve the quality of my data.

Create an account or sign in to comment

Important Information

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

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.