+ Reply to Thread
Results 1 to 2 of 2

Removing text

  1. #1
    Registered User
    Join Date
    02-08-2009
    Location
    Melbourne
    MS-Off Ver
    Excel 2003
    Posts
    7

    Removing text

    Hi,

    I'm trying to remove the code &cID=(random_number_here) from a sitemap in excel. The random number is an ID when a customer views a product page. I need &cID=(random_number_here) remove from my product pages where it also comes up on the category which i would like it to stay there.

    I'm looking for a macro that removes &cID=(random_number_here) from the product page and leaves it in the category page. Here is an example on what it looks like

    http://www.domain.com/categories.asp?cID=430
    http://www.domain.com/product.asp?pID=1964&cID=8

    The link is in the same column where i want
    http://www.domain.com/product.asp?pID=1964&cID=8
    to be change to
    http://www.domain.com/product.asp?pID=1964
    Last edited by noregretss; 02-08-2009 at 03:26 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Removing text

    A sample file would be helpful in this instance, however, you could try something like the below:

    Please Login or Register  to view this content.
    The above is setup to fire against Column A of the selected sheet -- it will prompt user to enter variable to be stripped (eg cid) ... and will then process the strings in the column and remove the offending variable.

    I hope it helps.

    (With most VBA - ensure you have a backup of your present data prior to running as you won't be able to "Undo")
    Last edited by DonkeyOte; 02-08-2009 at 10:41 AM. Reason: revised to add the variable = operator (ie test for cid= )

+ 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