Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 23rd, 2006, 07:03 AM
Registered User
 
Join Date: Sep 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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


 
Old September 24th, 2006, 08:19 AM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Separating a CSV cell into 1 value per cell bigtonyicu Excel VBA 2 March 14th, 2008 12:28 PM
Copy data into cell by cell zone Excel VBA 2 September 4th, 2007 11:50 AM
Refer to a cell with a DataView bufanator VB.NET 2002/2003 Basics 2 January 11th, 2007 04:55 PM
if the cell content is a part of another cell cont sriramus Excel VBA 1 November 15th, 2005 10:20 AM
Lose cell Text when editing cell in VSFlexGrid 6 bobcratchet VB How-To 0 July 30th, 2004 09:32 AM





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