Excel’s default is to use relative reference when using formulas. That means that when a formula is copied and pasted into another cell the formula will change its reference points by the exact number of columns and rows that you moved the formula.
We achieve this by including or omitting the dollar sign.
Demonstrated below in the left worksheet we entered the formula B1*A2 and in the right worksheet we copied that formula down into C3 but Excel changed the formula to B2*A3 (One row down the column, just like we moved the formula)
How do we stop this change from occurring? Using absolute reference and learning where to insert a dollar sign ($) we can tell Excel exactly what elements of the formula we want to stay the same as we move from cell to cell. Cell referencing is about linking one cell based on the current cell. It is mostly known for altering formulas. For example, the below worksheet shows =B$1*A2 entered into C2, thus, linking B1 to C2. If B1 is altered in any way C2 will also be altered.
By adding the dollar sign into the formula you can tell Excel to keep the row the same, keep the column the same or keep the row and the column the same.
Keeping the Row the same:
Enter the dollar sign before the Row Number in the equation to keep the row the same. In this instance, we want to keep B1 as the cell that is multiplied by all other cells. We enter =B$1 to show this as we move down column D. If you were to move this formula to Column E the reference will stay in Row 1 but it will also move to Column C because we did not make Column B an absolute reference. The same is true for the second half of the equation instead of Column A being the reference it would now be Column B.
Keeping the Column the same:
Enter the dollar sign before the Column Heading in the equation to keep the column the same. Here we added a few more numbers to row B and now want to multiply down the column. We enter $B to tell Excel this.
Keeping both the Row and the Column the same:
Combine the above two placements of the dollar sign to keep both the column and the row the same in the formula.
Enter $B$1 to tell Excel to use the exact Column and Row as in the original formula. No matter where in the worksheet you copy the formula the B1 will be used as the multiplier, however, the second value (A2) will change because it is a relative reference.
Tip: When typing your formula, you can hold F4 and toggle from relative reference to any of the three styles of absolute reference listed above. For Example, enter =B1 and hit F4 it changes to =$B$1, hit F4 again and it changes to =B$1, hit it again to get =$B1, and one last time to return to =B1
Using Absolute Reference
In the example worksheet below, the company bases its future advertising costs on last year’s sales. Twenty-percent of the previous year’s sales will be allocated to the new year’s advertising costs. We are going to sum each district’s sales for the year by making the row range an absolute reference. Then sum each district’s sales for the month making the column range an absolute reference.
Finally, setting both the column and row as an absolute range we will the total sales per month by the 20% Advertising costs.
Total District Sales for the Year:
1. In Row 14, Column B enter =SUM(B$2:B$13) to add all values in Column B.
2. Copy across Row 14 and Excel will keep the Row Range (2 -13) the same but will change the columns.
Total Sales Per Month
1. In Cell E2 enter =SUM($B2:$D2) to add the values across the Row 2.
2. Copy down Column E and Excel will keep the Column Range the same (B-D) but will move down each row.
Calculate Advertising Costs per Month
1. Enter the 20% into any cell (this example it’s entered into B15)
2. We will use the data from Column E since it is a sum of the three columns before it.
3. In F2 Enter =E2*$B$15 telling Excel that as me move down Colum F we want to multiply each row by the data in B15
4. Double-clicked the bottom right of the cell and Excel will auto-fill the remaining pertinent cells within Column F.
Now we have a total for each month’s projected Advertising Costs. Copy the formula from District Sales for the Year over to E14 and we now have the Total Projected Advertising Costs for the next Year
Using Absolute Reference with Multiple Worksheets
In the above worksheet (Sheet 9), we have the 2018 Projected Costs for each month. We want to use our original worksheet (Sheet 8) where we projected the advertising costs to fill in Column F for Advertising.
1. In Cell F2 of Sheet 9 above enter the equal sign (=)
2. Either Click in Sheet 8’s Tab and select January’s Advertising Costs (F2) or type Sheet8! Followed by $F2 or =Sheet8!$F2
3. Either double-click the bottom right corner of Cell F2, click and drag down the column to auto-fill the Projected Advertising costs per month or copy the formula and paste into each cell.
Changing the referencing of a formula to absolute is quite simple as you have seen. The key is to know exactly how you want your formulas to work. If you know that you want a range of data to be multiplied by a single cell then you know to use absolute referencing, which, is a lot less time consuming than creating a column next to your range and adding the multiplier down that column and working across the rows to get your answer. Absolute referencing will make your worksheets look much cleaner and well-organized.
Before you go, if you want to learn more about how Excel References work then feel free to check out our Formulas Book 'The only 27 Formulas a Professional Needs to Succeed'
The post Dollar $ in Excel – Absolute and Relative References appeared first on Earn and Excel.
No comments:
Post a Comment