+ Reply to Thread
Results 1 to 2 of 2

macro to change in a cell contenaing lot of data some part

  1. #1
    Registered User
    Join Date
    03-08-2010
    Location
    geneve
    MS-Off Ver
    Excel 2003
    Posts
    1

    macro to change in a cell contenaing lot of data some part

    Hi everybody, and very happy to be among you on this forum..

    I will try to explain my issue :

    In deed Ive an excel file with datas ... and i have to change them into a css file.
    this css file contain html code.. so this data has to be amonghtml tag....

    So what did i do... i've for example a cell contenaing

    "<div class="bottom">
    <div class="bottom_down"></div>
    <div class="boxtext">
    <p class="title">
    About PNH</p>
    <div class="icon1a">
    <img src="/styles/images/question_mark.jpg" alt="" width="45" height="45" />
    </div>
    <div>
    <p class="boxtext2">
    <strong><a class="grayboxtitle" href="/About/default.aspx" title="HomeMC_title?">
    HomeMC_title</a></strong><a href="/About/default.aspx" title="HomeMC_title?"
    class="arrow"></a>
    <br />
    <a class="grayboxtext" href="/About/default.aspx" title="HomeMC_title?">HomeMC_p</a></p>
    </div>
    <div>
    .....
    " quite big size


    and i"ve my excel file which contain the key word and the value to put instead

    HomeMC_title "value to put instead"
    HomeMC_p "value HomeMC_p to put instead"

    which is actually different language..... just to let you know.


    so I did a function to automatize that ::

    currentLab = ActiveCell.Offset(0, 1).Value
    j = 1
    ind = 5

    Do Until IsEmpty(ActiveCell)

    What = ActiveCell.Offset(0, 3).Value
    repl = ActiveCell.Offset(0, 4).Value

    ActiveCell.Offset(0, 5).replace What:=What, Replacement:=repl, LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
    ReplaceFormat:=False

    ' Step down 1 row from present location.
    ActiveCell.Offset(1, 0).Select
    Loop


    But it doesn"t change anything, when i put a watch on my ActiveCell.Offset(0, 5), it's the good cell and when I do it manually it gives an error : "Formula is too long"

    What do you reckon ?

    Thanks a lot,

    For information, thuses xml come from globalization.resx file ...

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: macro to change in a cell contenaing lot of data some part

    You need to add code tags as per forum rules.

+ 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