January 12, 20215 yr 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...?
January 12, 20215 yr 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.
Create an account or sign in to comment