+ Reply to Thread
Results 1 to 2 of 2

syntax question

  1. #1
    JT
    Guest

    syntax question

    I'm having a problem with the correct syntax on the following line:

    ActiveCell.Offset(0, 2).FormulaR1C1 = "=text(mid(r[]c[-1]),6,5)),""00"")"

    The problem is it is putting the formula in the cell instead of the actual
    value. I have tried to remove the begging and ending " but then I get an
    error on the 'r[]'. I'm sure it is the syntax, I just don't know how to
    correct it. Thanks for the help.....


    --
    JT

  2. #2
    Bob Phillips
    Guest

    Re: syntax question

    With ActiveCell
    .Offset(0, 2).Value = Evaluate("text(mid(" & .Offset(0, -1).Address
    & _
    ",6,5),""00"")")
    End With


    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "JT" <[email protected]> wrote in message
    news:[email protected]...
    > I'm having a problem with the correct syntax on the following line:
    >
    > ActiveCell.Offset(0, 2).FormulaR1C1 = "=text(mid(r[]c[-1]),6,5)),""00"")"
    >
    > The problem is it is putting the formula in the cell instead of the actual
    > value. I have tried to remove the begging and ending " but then I get an
    > error on the 'r[]'. I'm sure it is the syntax, I just don't know how to
    > correct it. Thanks for the help.....
    >
    >
    > --
    > JT




+ 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