Loading ...
Sorry, an error occurred while loading the content.

Re: prefix "http://"

Expand Messages
  • Eugeny.Sattler@RU.NESTLE.com
    ... I would elaborate this a bit. Imagine you have incoming data containing both links starting from www. and starting from http://www. For those starting
    Message 1 of 4 , Dec 16, 2004
    • 0 Attachment
      > in MS Excel you can use the formula
      > ="http://"&A1

      > provided the cell A1 contains smth like
      > "www2.thesite_without_http.com/subdir/page.htm"

      > then you can drag this formula down the column (mouse
      > pointer should be on the right bottom cell corner)

      I would elaborate this a bit.
      Imagine you have incoming data containing both links
      starting from "www." and starting from "http://www."
      For those starting from "www." my formula will work OK.
      But for those starting with "http" you will get http://http://www etc
      after you drag down the formula. Definitely not what we want!

      Here is a smart formula:

      =IF(LEFT(A1;7)="http://";A1;"http://"&A1)

      It checks if the first seven symbols are "http://" and if its true, does
      nothing,
      otherwise adds "http://"

      For maximum safety, you might wish to replace all occurencies of "A1"
      in the formula with TRIM(A1)
      That will eliminate all leading and trailing spaces, if any, from incoming
      strings.

      regards ,
      Eugeny
    Your message has been successfully submitted and would be delivered to recipients shortly.