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
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
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
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
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
>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks