relative/absolute address - newbie Q.

DonAndress

Active Member
Joined
Sep 25, 2011
Messages
365
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hello.

I am having a really hard time understanding absolute and relative ways of addressing cells.

Could you please help me undestand it or at least change the address below, as I have no idea how they work?
In my project I need absolute addresses.


Code:
Sheets("sheet2").Select
    Range("A1").Select
    val = "=sheet2!R[38]C[-7]-sheet2!R[50]C[-7]"
Sheets("sheet1").Select
    Range("J3").Select
    Selection.Value = val
    Selection.NumberFormat = "_(* #,##0.00_);_(* (#,##0.00);_(* ""-""??_);_(@_)"
    Application.CutCopyMode = False
Of course I'm refering to "val" calculations so is there any possibility to change addresses to any understadable format? ;)
 
Your asking about relative referencing in VBA suggest that you might want to look at the .Offset property.
 
Upvote 0

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Thank you, Cindy.
My project works smoothly now :)



mikerickson, I sure will, thanks.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,812
Members
452,945
Latest member
Bib195

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