ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pulling Part of a String (https://www.excelbanter.com/excel-programming/380246-re-pulling-part-string.html)

Don Guillett

Pulling Part of a String
 
instrrev
If you don't have this, post back for a function


--
Don Guillett
SalesAid Software

"RSteph" wrote in message
...
I've used the Mid and InStr functions to pull out parts of a string
starting
from the left end of the string and running to the end of string (within a
cell).

Is there a way for me to go from the other direction? Start from the end
of
the cell, and work my way backwards? I've got a column with a list of
items
and then four sets of numbers. I want to pull the sets of numbers out into
other columns. The problem is that the item names are not uniform in
length,
and some have one word names, some have 2-3 word names, so simply using
spaces, and starting points won't work for me.

I tried to look into doing something where I started from the start of the
string, and searched for the first numeric value, then work from there...
but
I couldn't get that to work either.

Any help would be greatly appreciated.




Don Guillett

Pulling Part of a String
 

It goes from the end of the string but reports from the left

xxxxYss answer would be 5
--
Don Guillett
SalesAid Software

"RSteph" wrote in message
...
Does this only let you check for a set string, or does this work the same
as
the instr() function, taking from the end of the string, backwards to the
specified point (i.e. first space found)?

"Don Guillett" wrote:

instrrev
If you don't have this, post back for a function


--
Don Guillett
SalesAid Software

"RSteph" wrote in message
...
I've used the Mid and InStr functions to pull out parts of a string
starting
from the left end of the string and running to the end of string
(within a
cell).

Is there a way for me to go from the other direction? Start from the
end
of
the cell, and work my way backwards? I've got a column with a list of
items
and then four sets of numbers. I want to pull the sets of numbers out
into
other columns. The problem is that the item names are not uniform in
length,
and some have one word names, some have 2-3 word names, so simply using
spaces, and starting points won't work for me.

I tried to look into doing something where I started from the start of
the
string, and searched for the first numeric value, then work from
there...
but
I couldn't get that to work either.

Any help would be greatly appreciated.








All times are GMT +1. The time now is 08:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com