+ Reply to Thread
Results 1 to 2 of 2

how to write text formula which involves multiple txt variables

  1. #1
    Forum Contributor
    Join Date
    12-03-2008
    Location
    Key West, FL
    MS-Off Ver
    365 Apps for Enterprise
    Posts
    666

    how to write text formula which involves multiple txt variables

    I'm working on massive 301 redirect project. My site was translated into over 50 languages, each page of each language cached in the search engines.

    Now that i have revised the site I'm getting lots of 404's which is not good for SEO.

    So here's the challenge:

    The "bad" URL will look something like this:
    HTML Code: 
    I want to redirect to
    HTML Code: 
    Other variations of "bad" urls might look like this:
    HTML Code: 
    HTML Code: 
    HTML Code: 
    What I need to do is search for the language and create a new, concatenated cell which will begin each new url with the appropriate language.

    Can someone assist me with a formula? I've attached a workbook with examples.

    Thanks.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    10-13-2011
    Location
    Northern California
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: how to write text formula which involves multiple txt variables

    Create the name seq referring to the formula =ROW(INDIRECT("A1:A256")). If a url to be changed is in cell A5, try the following formula.

    =IF(COUNTIF(A5,"*/??/*"),MID(A5,SEARCH("/??/",A5),4),"/")&CHOOSE(MATCH(2,1/COUNTIF(A5,"*"&REPT("/*",{0,1,2}))),
    "",SUBSTITUTE(MID(A5,FIND("/",A5)+1,256),"old-","new-"),MID(A5,LOOKUP(2,1/(MID(A5,seq,1)="/"),seq)+1,256))&"/"

    This isn't a task for which Excel is well suited. Any scripting language would be better suited to this type of text transformation.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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