I need a relative cell address. i.e. "A2" not "$A$2"
When I use myAddress = Worksheets("Sheet1").Cells(1, 2).Address
,
myAddress returns $B$2. I actually need the relative value B2
.
Why, you ask? I knew you would ask... Because I want to then fill down the formula using that B2
cell address to all of the cells below it. And I don't want each subsequent cell to refer to B2
, but C2
then D2
and so on.
Look at the name box. The name is usually the row character followed by the column number, such as cell A1. read more if your active cell is not visible in your window. It will show you the active cell address.
Relative cell references are basic cell references that adjust and change when copied or when using AutoFill. Example: =SUM(B5:B8), as shown below, changes to =SUM(C5:C8) when copied across to the next cell. Situations arise in which the cell reference must remain the same when copied or when using AutoFill.
Address is used to get the cell address for simple local reference (ex. $A$1) or reference style notation for cell references (ex. A1 or R1C1 format). It can also be used to get the range address which includes the workbook name and worksheet name.
myAddress = Worksheets("Sheet1").Cells(1, 2).Address(False, False)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With