Skip to main content
Solved

How to Split the text of the description

  • Aug 1, 2024 4:20 AM UTC
  • 1 reply
  • 118 views
  • Translate All

Forum|alt.badge.img

I want to split the description as below.

“Video Conference-Non stock” item.

I am not sure as to how do I split this or get data to the left of ‘-’

I did try using the Instr and Strrev function to no avail.

Can I please receive some suggestions on this.

 

 

Best answer by nhatnghetinh

Hi @amitkaryekar 

Please use InStr( str, findStr ) and Left( str, length ) combined with IIF function.

For example:

= IIf( InStr( [InventoryItem.Descr], '-' ) > 0 
    , Left( [InventoryItem.Descr], InStr( [InventoryItem.Descr], '-' ) )
    , [InventoryItem.Descr] )
 

 

Best Regards,

NNT

View original

1 reply

nhatnghetinh
Captain II
Forum|alt.badge.img+15
  • Captain II
  • Answer
  • Aug 1, 2024 7:05 AM UTC

Hi @amitkaryekar 

Please use InStr( str, findStr ) and Left( str, length ) combined with IIF function.

For example:

= IIf( InStr( [InventoryItem.Descr], '-' ) > 0 
    , Left( [InventoryItem.Descr], InStr( [InventoryItem.Descr], '-' ) )
    , [InventoryItem.Descr] )
 

 

Best Regards,

NNT

Translate