p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Excel VBA (http://p2p.wrox.com/forumdisplay.php?f=79)
-   -   I need to refer a cell within a cell like =RC[ RC2 (http://p2p.wrox.com/showthread.php?t=48209)

chakravarthi_os September 23rd, 2006 07:03 AM

I need to refer a cell within a cell like =RC[ RC2
 
Hi,

I need to refer a cell within a cell like =RC[ RC25].

For example the value 13 is stored in the cell RC25.
Then the formula will be =RC[13].

Please help me how do i do it.
I will eagerly wait for your reply.
Thanks & Regards

O.S.Chakravarthi
Sr.Software Development Engineer
Dell IT India



Shasur September 24th, 2006 08:19 AM

Iam not sure if I have got your query.

If you want to have a formula referring to the other cell

Sub WroxExcel()
    iRow1 = 2
    iCol1 = 2
    iRow2 = 3
    iCol2 = 3
    Cells(iRow2, iCol2).Formula = "=RC[" & Cells(iRow1, iCol1).Value & "]"

End Sub
Regards
Shasur

http://www.vbadud.blogspot.com


All times are GMT -4. The time now is 07:37 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.