relative vs absolute analogy

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hello
I am kind of understand what is Relative and Absolute address but I would like a real life analogy that would help to understand the concept. Is there any example? Thank you.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Excel 2016 (Windows) 32 bit
ABCDEFGHIJKLM
1123456789101112
21Replace with Formula
32
43
54
65
76
87
98
109
1110
1211
1312
Sheet1

Copy that table to excel, replace B2 with a formula that multipleis row 1 to column, (in essence, creating a times-table)

The catch is, you can only make 1 formula, then drag it across to the right and down with the fill handle, and it still must calculate properly
 
Last edited:
Upvote 0
Then,

Excel 2016 (Windows) 32 bit
ABCDEFGHIJKLMNO
1123456789101112Test
21Replace with Formula
32
43
54
65
76
87
98
109
1110
1211
1312
Sheet1

Do the same, but add the text in N1 to the beginning of each cell in your formula. for example, B2 should say "Test 1"
 
Last edited:
Upvote 0
If you are talking about excel, a relative cell address (or refrence) look like this: A1
A absolute refrence looks like this: $A$1

In the first example above, type in =B1*A2

copy it across and down. then, double click random cells. do you see how thats different than if u would have typed: =B$1*$A2 ?
 
Upvote 0
Thanks for your reply. I was reading the example below but I still can not relate it to Excel.

https://www.codecademy.com/en/forum_questions/529badc780ff3306c1012ee5

In CSS, absolute positioning will keep the page element from moving. Likewise in Excel, the absolute reference will not move/change no matter where you place it on the worksheet. Relative in CSS will move, just like in Excel. The difference there is that in CSS you must tell it where to move (top,left,bottom,right) or it remains static, while in Excel it automatically changes the reference by whatever magnitude/direction you copy the cell as in dave2018's example.
 
Last edited:
Upvote 0
Here's another way to look at it. Say you have a list of prices, and you want to figure out what the tax on each item is at a 7.5% rate. You could put your list in column A. Then in B2, put the formula below:

ABCDEFGHIJ
1 Cost Tax Cost Tax 7.75% Cost Tax 7.75%
2 $ 20.00 $ 1.50 $ 20.00 $ 1.55 $ 20.00 $ 1.55
3 $ 30.00 $ 2.25 $ 30.00 $ - $ 30.00 $ 2.33
4 $ 25.00 $ 1.88 $ 25.00 $ - $ 25.00 $ 1.94
5 $ 100.00 $ 7.50 $ 100.00 $ - $ 100.00 $ 7.75
6 $ 19.95 $ 1.50 $ 19.95 $ - $ 19.95 $ 1.55

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
B2=A2*7.5%
E2=D2*F1
I2=H2*J$1

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>



Then copy cell B2, and paste it to B3:B6. Now look at cell B3. The formula becomes =A3*7.5% which is what you want. You don't want it to still say =A2*7.5% because that would give you the same answer as the B2 cell, which we already have. So that's why Excel has relative referencing, so that you can write a formula once, and have it apply to a large range of data.

Now say that the tax rate changes to 7.75%, and you need to change the formulas. You could change the A2 cell again, then paste it down the column again, but that seems like a lot of work, especially if you know the rate may change again in the future. So let's put the tax rate in F1, put F1 in the formula instead of 7.75%, then if it ever changes in the future, we just need to change F1, not all the formulas. So in D put the prices, and in E2 put =D2*F1. Looks good so far, we get $1.55. Now copy E2 and paste down the column. Hey, they're all zero! What gives? Look at the formula in E3. It says =D3*F2. There's nothing in F2, so we get D3*0 = 0. The helpful relative referencing that Excel did for us before is now working against us. How can we tell Excel that we want the D2 reference to change as we paste it to different cells, but keep the F1 cell fixed as we paste it to other cells? In other words, make it an absolute reference?

That's done by putting a $ sign in front of the part that you want to keep fixed. So finally put your prices in H, and =H2*J$1 in I2. Copy I2 and paste down. Now you get the right answers. But if you paste the formula to a different column, you'll get the wrong answer again, because I only fixed the row reference, not the column reference.

It can take a little while to wrap your head around the concept. Sometimes you have to stop and think about which row and/or column you want fixed. Just practice and it will get easier.
 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

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