It was pointed out in a comment to this post at Daily Dose of Excel that VBA has a StrReverse function that will (logically enough) reverse a string. That’s not awfully useful to me (except maybe for Project Euler), but it did set me thinking that I spend a fair amount of time writing lengthy formulas in Excel to extract bits of strings, which could be done with much less typing with a few simple User Defined Functions.
So here they are; download from String Functions.zip; full open source code is in the download file.
(Now updated as suggested by Dick K in the comments with a MidW() function, and an optional delimiter parameter)
leftw(); Return the first word(s) from a string
rightw(); Return the last word(s) from a string
Midw(); Return words(s) from the middle of a string
FINDrev(); Find from the right hand end
Leftval(); Extract a value from the left end of a string
Rightval(); Extract a value from the right end of a string
Reverse(); Reverse a string
Screenshot with more details: