MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Get cell address with VBA without absolute address

Posted by MELISSA on February 01, 2002 11:41 AM

I have a line of code that creates a link to another sheet but it comes back with an absolute reference.
Here's the line:
ActiveCell.Formula = "=" & "BUDGET" & "!" & cellAdd
(cellAdd is a variable) It works but
it returns a formula like this =BUDGET!$A$1
I need it like this =BUDGET!A1
How do I get it without the $ signs

Posted by Ivan F Moala on February 01, 2002 1:15 PM

Define your celladd as;

cellAdd = ActiveCell.Offset(1, 0).Address(False, False)

The 2 falses indicating row & column Absolute
references used.


Posted by Melissa on February 01, 2002 5:37 PM

Thank you so much Ivan
It worked perfectly