Microsoft Excel Basic #4 - Anchoring a cell to be used in computations - Part 2

In the previous post, we anchored the row number.  In this example, we will anchor the column and then anchor both the row and the column.

In the image below, we want to add the value in cell B4 to the values in cells B1 to F1.  The formula to do this will be written in cells B2 to F2.  




For this example, we write the formula, =B1+$B4 in cell B2.  When we drag this formula to the right, the column for cell B4 will be anchored.  The formula is shown in the figure below.



The figure below shows the formula being applied to cell C2.  From this formula, we can see that column B has been anchored.  Note that the row number, 4, does not change since the row that we are applying the formula to does not change.  We can also see that all of the values in row 2 are equal to the values in row 1 plus the value in cell B4.



In the next example, we are adding the value in cell B9 to the values in cells B1 to D3.  The formulas will be applied in cells B5 to D7.  To do this we need to anchor both the row and the column.



In the figure below, we write the formula, =B1+$B$9, in cell B5.  This anchors both the row and the column.  This will result in the value found in cell B9 to be applied as we drag the formula both to the right and then down.  



The figure below shows the result of the formula being applied to cells B5 to D7.  We can see that the formula in cell D7 contains $B$9 since both the row and column were anchored.


Comments