Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default variable in a formula

jobra,

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

HTH,
Bernie
MS Excel MVP


"jobra" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default variable in a formula

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

--
Regards,
Tom Ogilvy

"jobra" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DDE formula with variable Bruce Excel Worksheet Functions 0 November 16th 07 09:03 AM
Variable within a formula Tom Melosi Excel Worksheet Functions 4 August 21st 07 04:07 AM
use a variable in a formula Marcotte A Excel Programming 2 August 26th 04 01:24 AM
variable in a formula libby Excel Programming 3 August 15th 04 04:31 AM
Variable in a Formula Amy Ja Excel Programming 3 April 21st 04 01:22 AM


All times are GMT +1. The time now is 10:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"