+ Reply to Thread
Results 1 to 4 of 4

[SOLVED] Pasting data following the last " > " in a cell

  1. #1
    Jim Jackson
    Guest

    [SOLVED] Pasting data following the last " > " in a cell

    I have a column which contains data separated by " > " in two or more
    locations within each cell. I need to paste the farthest right data into
    another cell.

    Example: Names > Places > Cities etc.

    I have searched the Posts her for an idea but nothing gets the desired
    result. I have even tried replacing " > " with " " but there still are two
    or more of these.

    Any ideas would be greatly appreciated.

    --
    Best wishes,

    Jim

  2. #2
    MDW
    Guest

    RE: Pasting data following the last " > " in a cell

    Sounds like you need the InStrRev() function. It finds the LAST instance of a
    search string within a source string, but the return value is relative to the
    regular order.

    strC = "Names > Places > Cities"

    intRev = InStrRev(strC,">")

    strLast = Trim(Mid(strC,intRev + 1))

    Range("D3").Value = strLast
    --
    Hmm...they have the Internet on COMPUTERS now!


    "Jim Jackson" wrote:

    > I have a column which contains data separated by " > " in two or more
    > locations within each cell. I need to paste the farthest right data into
    > another cell.
    >
    > Example: Names > Places > Cities etc.
    >
    > I have searched the Posts her for an idea but nothing gets the desired
    > result. I have even tried replacing " > " with " " but there still are two
    > or more of these.
    >
    > Any ideas would be greatly appreciated.
    >
    > --
    > Best wishes,
    >
    > Jim


  3. #3
    Jim Jackson
    Guest

    RE: Pasting data following the last " > " in a cell

    It works perfectly!

    Thank you. This has been about to drive me more nuts than I already am.

    It just goes to show, no matter how much one thinks he has learned, the
    surface has only begun to be scratched.
    --
    Best wishes,

    Jim


    "MDW" wrote:

    > Sounds like you need the InStrRev() function. It finds the LAST instance of a
    > search string within a source string, but the return value is relative to the
    > regular order.
    >
    > strC = "Names > Places > Cities"
    >
    > intRev = InStrRev(strC,">")
    >
    > strLast = Trim(Mid(strC,intRev + 1))
    >
    > Range("D3").Value = strLast
    > --
    > Hmm...they have the Internet on COMPUTERS now!
    >
    >
    > "Jim Jackson" wrote:
    >
    > > I have a column which contains data separated by " > " in two or more
    > > locations within each cell. I need to paste the farthest right data into
    > > another cell.
    > >
    > > Example: Names > Places > Cities etc.
    > >
    > > I have searched the Posts her for an idea but nothing gets the desired
    > > result. I have even tried replacing " > " with " " but there still are two
    > > or more of these.
    > >
    > > Any ideas would be greatly appreciated.
    > >
    > > --
    > > Best wishes,
    > >
    > > Jim


  4. #4
    MDW
    Guest

    RE: Pasting data following the last " > " in a cell

    No problem. Glad I could help!
    --
    Hmm...they have the Internet on COMPUTERS now!


    "Jim Jackson" wrote:

    > It works perfectly!
    >
    > Thank you. This has been about to drive me more nuts than I already am.
    >
    > It just goes to show, no matter how much one thinks he has learned, the
    > surface has only begun to be scratched.
    > --
    > Best wishes,
    >
    > Jim
    >
    >
    > "MDW" wrote:
    >
    > > Sounds like you need the InStrRev() function. It finds the LAST instance of a
    > > search string within a source string, but the return value is relative to the
    > > regular order.
    > >
    > > strC = "Names > Places > Cities"
    > >
    > > intRev = InStrRev(strC,">")
    > >
    > > strLast = Trim(Mid(strC,intRev + 1))
    > >
    > > Range("D3").Value = strLast
    > > --
    > > Hmm...they have the Internet on COMPUTERS now!
    > >
    > >
    > > "Jim Jackson" wrote:
    > >
    > > > I have a column which contains data separated by " > " in two or more
    > > > locations within each cell. I need to paste the farthest right data into
    > > > another cell.
    > > >
    > > > Example: Names > Places > Cities etc.
    > > >
    > > > I have searched the Posts her for an idea but nothing gets the desired
    > > > result. I have even tried replacing " > " with " " but there still are two
    > > > or more of these.
    > > >
    > > > Any ideas would be greatly appreciated.
    > > >
    > > > --
    > > > Best wishes,
    > > >
    > > > Jim


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1