Non-absolute verson of Range.Address

Shads

New Member
Joined
Dec 3, 2014
Messages
5
Is there a non-absolute version of Range.Address? I have a VBA code that builds the outline of a spread-sheet with formula's, formatting etc. It contains a loop which puts formula into a column but I would like the formula to use relative addresses so that later on I could extend the number of rows covered from within Excel if needed (using the cells' bottom-right handle thingy). Range(...).Address returns the address like $E$8 whereas I would like E8. Do I have to write a string-slicing function or is there a property of Range that can be called. Example:

Code:
[FONT=Calibri][SIZE=3][FONT=Calibri][SIZE=3]Dim C_max_row As Long, i As Long

C_Max_row = 25

'...

For i = 2 To C_Max_row

    With ActiveSheet.Cells(i, 5)

        .Formula = "=IFERROR(LOOKUP(" & .Offset(0, -3).Address & "$F$2:$L$2,$F$1:$L$1),"""")"

        '...

    End With

Next i

[/SIZE][/FONT][/SIZE][/FONT]
Thanks
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Use:
Code:
.Offset(0, -3).Address(0,0)
 
Upvote 0
Rory...
I've been working around this problem and cursing Microsoft about it for years.
Finally, you have saved me!
Excellent! Marvelous!
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top