Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Using Relative Reference in a Formula

I am having trouble using a formula. Here is the formula I am trying to make
work: ActiveCell.FormulaR1C1 = "=ROUND(RC[-1]*Cell A1".

The "Cell A1" is the cell that I want to reference. This formula will be
used in mulitiple rows but it will always look for the value of cell A1. The
problem is that it will not let me mix both relative and absolute references
in the formula.

I guess that I could also assign a variable with the value of cell A1 and
use that in the formula. But I don't know how to do that either.
Does anyone know how to do this?
Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Using Relative Reference in a Formula

Thanks...but I still can't get it to work.

Here is my formula: ActiveCell.FormulaR1C1 = "=ROUND(RC[-1]*R3C2)"

So I should get the value in cell B3, right? I have a value there. When I
run it I get an Application or Object Defined Error.

What do you think I am doing wrong?

Thanks again.

"Ardus Petus" wrote:

If you want to reference cell B3, enter:
ActiveCell.FormulaR1C1 = "=ROUND(RC[-1]*R3C2"

R3C2 is an absolutre reference to cell $B$3

HTH
--
AP

"tedd13" a écrit dans le message de news:
...
I am having trouble using a formula. Here is the formula I am trying to
make
work: ActiveCell.FormulaR1C1 = "=ROUND(RC[-1]*Cell A1".

The "Cell A1" is the cell that I want to reference. This formula will be
used in mulitiple rows but it will always look for the value of cell A1.
The
problem is that it will not let me mix both relative and absolute
references
in the formula.

I guess that I could also assign a variable with the value of cell A1 and
use that in the formula. But I don't know how to do that either.
Does anyone know how to do this?
Thanks




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using Relative Reference in a Formula


It looks to me that you're missing what digit it is to round to.
Try this:
ActiveCell.FormulaR1C1 = "=ROUND(RC[-1]*R3C2,0)"

where 0 is the digit to be rounded to.

-Ikaabod

tedd13 Wrote:
Thanks...but I still can't get it to work.

Here is my formula: ActiveCell.FormulaR1C1 = "=ROUND(RC[-1]*R3C2)"

So I should get the value in cell B3, right? I have a value there.
When I
run it I get an Application or Object Defined Error.

What do you think I am doing wrong?

Thanks again.



[/color][/color]


--
Ikaabod
------------------------------------------------------------------------
Ikaabod's Profile: http://www.excelforum.com/member.php...o&userid=33371
View this thread: http://www.excelforum.com/showthread...hreadid=540656

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Using Relative Reference in a Formula

That was it!!!! Thanks

"Ikaabod" wrote:


It looks to me that you're missing what digit it is to round to.
Try this:
ActiveCell.FormulaR1C1 = "=ROUND(RC[-1]*R3C2,0)"

where 0 is the digit to be rounded to.

-Ikaabod

tedd13 Wrote:
Thanks...but I still can't get it to work.

Here is my formula: ActiveCell.FormulaR1C1 = "=ROUND(RC[-1]*R3C2)"

So I should get the value in cell B3, right? I have a value there.
When I
run it I get an Application or Object Defined Error.

What do you think I am doing wrong?

Thanks again.



[/color]


--
Ikaabod
------------------------------------------------------------------------
Ikaabod's Profile: http://www.excelforum.com/member.php...o&userid=33371
View this thread: http://www.excelforum.com/showthread...hreadid=540656

[/color]
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
Referencing relative to a formula reference Csaba Gabor Excel Worksheet Functions 3 April 26th 10 01:13 PM
Relative Range Reference in a sumifs formula cbotos Excel Worksheet Functions 6 April 1st 10 02:59 AM
Using an offset formula for the reference in a relative reference Cuda Excel Worksheet Functions 6 November 15th 06 05:12 PM
Copy a relative reference formula from one sheet to another. jannkatt Excel Discussion (Misc queries) 3 May 17th 06 07:13 PM
Mixing Absolute and Relative Reference in a Formula tedd13 Excel Programming 5 May 1st 06 03:06 PM


All times are GMT +1. The time now is 11:19 PM.

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

About Us

"It's about Microsoft Excel"