Monday, October 30, 2017

Extract the text between start point and end point

Function fnGetInText(str,startChar,endChar)
  'stores coloumn position of end character
endPoint=InStr(str,endChar)
'stores coloumn position of starting character
startPoint=InStr(str,startChar)      
'resultant text
resultText=Mid(str,startPoint+1,endPoint-startPoint-1)
fnGetInText=resultText
End Function

No comments:

Post a Comment