• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 636
  • Last Modified:

Excel find replace

Hi ,

I have a column with values like below.

Home > Work / Tools > Office Work Working Business Decal Stickers 002
Home > Work / Tools > test > Office Work Working Business Decal Stickers 002

Need output like

Home > Work / Tools
Home > Work / Tools > test

I need the last value of > get removed.

Thanks
0
magento
Asked:
magento
  • 2
1 Solution
 
SteveCommented:
See attached workbook with function "Splitit" acoded below:

Function splitit(StartString As String, Char As String) As String
Dim xx As Variant
xx = Split(StartString, Char)
splitit = Replace(StartString, xx(UBound(xx)), "")
End Function

Open in new window


This should do the job.
Splitit-function.xlsm
0
 
magentoAuthor Commented:
The_Barman,

Worked exactly as needed.

 Thank you .
0
 
krishnakrkcCommented:
Hi,

May be

Hit Ctrl + H

Find what: "> Office*" ( without quotes)

Leave empty Replace with column

Kris
0
 
magentoAuthor Commented:
Hi Kris,

Your solution will work only on text with Office.

Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now