+ Reply to Thread
Results 1 to 4 of 4

variable in a formula

  1. #1
    jobra
    Guest

    variable in a formula

    How can I use a variable in a formula as shown below?

    dim teller as integer
    (sample)
    teller = 6
    ActiveCell.FormulaR1C1 = _
    "=IF(ISBLANK(R[teller]C[-5]),"""",(RC[-4]+(-1*RC[-3]))

    this seems not to work can anyone help me?
    Thank you very much

  2. #2
    Bernie Deitrick
    Guest

    Re: variable in a formula

    jobra,

    ActiveCell.FormulaR1C1 = _
    "=IF(ISBLANK(R[" & teller & "]C[-5]),"""",(RC[-4]+(-1*RC[-3])))"

    HTH,
    Bernie
    MS Excel MVP


    "jobra" <[email protected]> wrote in message
    news:[email protected]...
    > How can I use a variable in a formula as shown below?
    >
    > dim teller as integer
    > (sample)
    > teller = 6
    > ActiveCell.FormulaR1C1 = _
    > "=IF(ISBLANK(R[teller]C[-5]),"""",(RC[-4]+(-1*RC[-3]))
    >
    > this seems not to work can anyone help me?
    > Thank you very much




  3. #3
    Tom Ogilvy
    Guest

    Re: variable in a formula

    teller = 6
    ActiveCell.FormulaR1C1 = _
    "=IF(ISBLANK(R[" _
    & teller & "]C[-5]),"""",(RC[-4]+(-1*RC[-3]))

    --
    Regards,
    Tom Ogilvy

    "jobra" <[email protected]> wrote in message
    news:[email protected]...
    > How can I use a variable in a formula as shown below?
    >
    > dim teller as integer
    > (sample)
    > teller = 6
    > ActiveCell.FormulaR1C1 = _
    > "=IF(ISBLANK(R[teller]C[-5]),"""",(RC[-4]+(-1*RC[-3]))
    >
    > this seems not to work can anyone help me?
    > Thank you very much




  4. #4
    jobra
    Guest

    Re: variable in a formula

    Both Bernie & Tom thank you very much

    "Tom Ogilvy" wrote:

    > teller = 6
    > ActiveCell.FormulaR1C1 = _
    > "=IF(ISBLANK(R[" _
    > & teller & "]C[-5]),"""",(RC[-4]+(-1*RC[-3]))
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "jobra" <[email protected]> wrote in message
    > news:[email protected]...
    > > How can I use a variable in a formula as shown below?
    > >
    > > dim teller as integer
    > > (sample)
    > > teller = 6
    > > ActiveCell.FormulaR1C1 = _
    > > "=IF(ISBLANK(R[teller]C[-5]),"""",(RC[-4]+(-1*RC[-3]))
    > >
    > > this seems not to work can anyone help me?
    > > Thank you very much

    >
    >
    >


+ 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