Skip to main content
Answer

How to Split the text of the description

  • August 1, 2024
  • 1 reply
  • 79 views

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

1 reply

nhatnghetinh
Captain II
Forum|alt.badge.img+11
  • Captain II
  • Answer
  • August 1, 2024

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