Using abosulte references in Sum function

FryGirl

Well-known Member
Joined
Nov 11, 2008
Messages
1,368
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Not sure I understand how Excel knows how to do this; however, one thing I know is it works, but thought I would ask.

In colunmn A I have some numbers with a running percentage in column B with the following formulas.

B12=SUM(A12:A$12)/SUM($A$12:$A$21)

B13=SUM(A$12:A13)/SUM($A$12:$A$21)

When I drag B12 down to B13 and so on the absolute references adjust automatically. Any ideas as to why? Again, the function works fine, just pondering why the references adjust?
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
The absolute references don't adjust, the relative refernces do. It's more common to have the absolute refernce before the relative, not after like in your first formula, i.e.

B12=SUM(A$12:A12)/SUM($A$12:$A$21)

B13=SUM(A$12:A13)/SUM($A$12:$A$21)


A row or column prefixed with $ is absolute so will remain unchanged anywhere you drag it, a row or column without the $ prefix is relative so will increase by 1 each cell you drag down or right and decrease when you drag up or left.
 
Upvote 0
Thanks Jason,

I understand the concept of absolutes and relative, but in this case, the formula starts off with:

=SUM(A12:A$12)/ in B12 and when drug down to B13 it changes to =SUM(A$12:A13)/

If the $ in A$12 will lock the row, then how come when drug down it changes to A13 and the absolute reference is now automattically shifted to the front of the formula. If there was no $ on the first A12, how come it appears there now?
 
Upvote 0
It rearranges the range so that it puts the earliest range first. The reason being is that Excel processes ranges from top left to bottom right, not the other way around.

For example, type into a cell:

=SUM(A100:A10). When you press enter, it will show =SUM(A10:A100)
 
Upvote 0
Thanks Kieth

Makes sense and I thought it was Excel being smarter than I and once again, Excel is :)

Thanks Jason
 
Upvote 0
This can happen if you drag up and then back down again

B12 =SUM(A$12:A12)

drag that up to B11 and you get B12=SUM(A11:A$12) which is correct, earliest range first.

Now drag B11 down to B12 and instead of the original =SUM(A$12:A12) you now get =SUM(A12:A$12)

Because the relative row hasn't exceeded the absolute, the ranges have not been inverted.

Trying to figure out "how it works" this could easily add i touch of confusion to the recipe.
 
Upvote 0

Forum statistics

Threads
1,224,589
Messages
6,179,744
Members
452,940
Latest member
rootytrip

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