Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Referencing A Cell In Excel

Status
Not open for further replies.

SandraF

Programmer
Jan 25, 2001
28
US
I have the following code to assign the value of one cell to another (in a macro):


Worksheets("LOG").Cells(Counter, 5).Value = ws.Cells(iRow, 1).Value

The problem is that I want to assign the cell reference to the Log worksheet cell so that if someone changes the contents of the cell in the ws worksheet it is linked to and will change the cell in the log worksheet automatically.

I have tried the address function in my macro, but can't get it to work.

Any Syggestions?

 
Let's assume that you want to reference cell "C3":
Code:
Worksheets("LOG").Cells(Counter, 5).Formula = "='" & ws.Name & "'!C3"
DimensionalSolutions@Core.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top