Split String Function for Excel

I couldn't seem to find a reasonable string splitting function in excel and I hate the foulness of using the LEFT() and FIND() function for such things.

This function below gives you the ability to split a string and return a value from it's split array.

You can use it like this....

hello, billy=SplitString(A2, ",", 1)

Which will return " billy"

Really, to make it a little more robust you may want to check the length of the array created from the split and make sure that the array value you are trying to get is available given the length.

Dom Finn

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment


Post a Comment