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.

Get Text left of , and right of ,

Featured Replies

Sorry... I am sure this calculation is in the forum somewhere and it's super simple.

Sample Text: 123 Main Street, Boston

Need the copy to the left of the comma..and then the copy to the right. 

I think its a LEFT calculation...?

2 minutes ago, MacFileman said:

Need the copy to the left of the comma..and then the copy to the right. 

The following calculation will return the text before the first comma:

Left ( text ; Position ( text ; "," ; 1 ; 1 ) - 1 )

Note that this assumes the given text does contain a comma - otherwise the result will be empty.


To extract the text after the first comma, you can use:

Right ( text ; Length ( text ) - Position ( text ; "," ; 1 ; 1 ) )

Note that "text after the first comma" includes the space immediately following the comma; if you don't want that, subtract 1 from the calculated position.


Alternatively you could start by substituting the comma with a carriage return, then use the GetValue() function to retrieve one of the resulting values. This is often a convenient shortcut - but it's usefulness is limited to specific cases. If you want to be able to parse any text, I recommend getting familiar with the basic method using Left(), Right(), Middle(), Position() and Length() functions.

 

 

 

  • Author

MY HERO!!!! Worked instantly!!!

 

THANK YOU!!!!!!!!!

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.