Kobayashi,
For i = 1 to FTDRange.Rows.Count
Cells(i, 3).Value = Cells(i, 3).Offset(0,-1)/ Range("findrange")
Next
or
For i = 1 to FTDRange.Rows.Count
Cells(i, 3).Value = Cells(i, 2)/ Range("findrange")
Next
Am a little unsure of how you are defining FTDRange.
"FTDRange.Cells" looks like a "double" reference to a range.
The code above assumes that FTDRange is a range starting in row 1 and
is in column C.
If this doesn't work. Post back and include how FTDRange is defined.
And what it is. Also need the same for findrange. Are they defined on the
worksheet or in the code. Makes a lot of difference.
Range defined in the worksheet use:
Range("myrange") = 5/2
Range("myrange").Value = ???
Range defined in code use:
Dim myrange as Range
Set myrange = Range("A1:A5")
myrange = 5/2
myrange.Value = ???
--
sb
"Kobayashi" wrote in message
...
I'm still new to this which might explain why I'm making such a pig's
ear of the below!
I am trying to perform an equation that divides that value in one cell
by the value in another. 'Findrange' is the range of the cell that has
the absolute value that I wish to divide by. RC[-1] is the relative
position that contains the value that I wish to have divided by the
value in the Findrange variable.
However, I simply cannot get this to work!
My code is as follows:
For i = 1 To FTDRange.Cells.Rows.Count
FTDRange.Cells(i).Value = "=rc[-1]" / findrange
i = i + 1
Next i
Any ideas???
Adrian
------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/