Alex Campbell
asked on
Would like this function to be made to work like a MID function, but in reverse.
I have a number of cells like this:
a2= Text to Columns - Data > Data Tools > Text to Columns
The number of dashes vary before the > symbol, but I always want to pull the data from the end of the cell up to the dash.
The function would work like this: FromEnd("-",a2) and it would return
- Data > Data Tools > Text to Columns
I could then use Mid to select after the dash.
Function Reverse(str As String) As String
Reverse = StrReverse(Trim(str))
End Function
a2= Text to Columns - Data > Data Tools > Text to Columns
The number of dashes vary before the > symbol, but I always want to pull the data from the end of the cell up to the dash.
The function would work like this: FromEnd("-",a2) and it would return
- Data > Data Tools > Text to Columns
I could then use Mid to select after the dash.
Function Reverse(str As String) As String
Reverse = StrReverse(Trim(str))
End Function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, works great.
You're welcome and I'm glad I was able to help.
If you expand the “Full Biography” section of my profile you'll find links to some articles I've written that may interest you.
Marty - Microsoft MVP 2009 to 2016
Experts Exchange MVE 2015
Experts Exchange Top Expert Visual Basic Classic 2012 to 2015
If you expand the “Full Biography” section of my profile you'll find links to some articles I've written that may interest you.
Marty - Microsoft MVP 2009 to 2016
Experts Exchange MVE 2015
Experts Exchange Top Expert Visual Basic Classic 2012 to 2015
Please try this....
Open in new window