Apr 15, 2019

Sort changes cell numbers in formulas that don't need to be changed

I created some simple data in google sheets that takes the number of one cell and divides it by another cell to give me a percentage. I wanted to try to sort the data in the sheet but every time I do the cell number for what I'm dividing by changes numbers.

Example
Column A has numbers going from cell 2 to cell 11 with cell 12 having a total number (row 1 having headers)
Column B contains the following formula for cell B2: =A2/A12
B3-11 follow suit with the formula being =A#/A12
B12 has a total percentage to add up column B

When I highlight my ranges and add filtering (excluding row 12 in the filtering), and try to sort by the percentages (or even by the numbers in column A) the sort changes what is divided by thus giving me the #DIV/0! error or some weird number that should not be a percentage at all.

Example
=A2/A12 →→ Sort →→ =A5/A17 (A17 has no info in it)

How do I keep it from changing the cell it's referencing for the division? Other than making the divided by number a solid number that needs to be changed in every cell every time I have to update the document.
Locked
Informational notification.
This question is locked and replying has been disabled.
Community content may not be verified or up-to-date. Learn more.
Last edited Apr 15, 2019
Recommended Answer
Apr 15, 2019
Hello
The very simple thing which pop-ups in the head, it is your reference in formula:

B2 = A2/$A$12 , symbol "$" giving absolute referencing and hasn't been changed by dragging down or  sorting. 
Note: The very thing that affects "$" it is deleting rows which in the effective range (e.g in your case from A2-A11). Also cutting cell A12 and pasting it in other place or even sheet will change the formula.

Hope it helps. If there some other questions, please share editable version of your sheet.
Original Poster S D 5929 marked this as an answer
Helpful?
All Replies (4)
Recommended Answer
Apr 15, 2019
Hello
The very simple thing which pop-ups in the head, it is your reference in formula:

B2 = A2/$A$12 , symbol "$" giving absolute referencing and hasn't been changed by dragging down or  sorting. 
Note: The very thing that affects "$" it is deleting rows which in the effective range (e.g in your case from A2-A11). Also cutting cell A12 and pasting it in other place or even sheet will change the formula.

Hope it helps. If there some other questions, please share editable version of your sheet.
Original Poster S D 5929 marked this as an answer
Jan 9, 2020
I think I am having a similar issue, with a fairly simple formula.  I have created a filter (sorting alphabetically by column B), after that filter is applied I have a SUM formula created. Everything works great. However, occasionally I need to sort alphabetically by column C - which goofs up the SUM formula. Is there a way to lock this cell so that the formula still generates based on the column B sort even when it is not actively sorted that way?

Thanks in advance for any help!!
Feb 4, 2020
Hi, sorry for post here but I don't  know how post any from scratch.

Can anyone help me?
My issue is very simple: references to data with filter get lost after the filter is used. They act as absolute references when in fact are not.
Feb 4, 2020
Here is a link to start a new thread:
false
4284060008177899508
true
Search Help Center
true
true
true
true
true
35
Search
Clear search
Close search
Main menu
false
false