Skip to main content

Absolute and Relative Cell Referencing in Excel

  - There are two important spreadsheet concepts we haven't yet explored: absolute cell references, and relative cell references. We'll explore these two ideas now. First, absolute cell references.

Relative cell references in Microsoft Excel

Take a look at the spreadsheet below (create it for yourself):
A simple spreadsheet
As you can see, it's quite simple. All we are doing is adding together the numbers in cells A1 and A2. We then put the answer in cell B2.
But suppose we wanted to copy the formula in cell B2 to cell B3. Let's try it and see what happens.
  • Click inside cell B2
  • Then click once with your right mouse button
  • A menu pops up
  • With your left mouse button, click Copy
  • Now click inside cell B3
  • Click once with your right mouse button
  • When the menu pops up, click on Paste
  • Your spreadsheet will look like the one below:
The contents have been copied
Excel has done something rather odd. It has given us the answer 25! The sum 20 + 25 clearly does not equal 25, so what's going on?
Well, look inside the formula bar. The formula is now reading = A2 + A3. Yet that was not the formula we pasted from cell B2. We copied and pasted the formula = A1 + A2. So why did Excel copy and paste the wrong formula?
The answer is that we used a Relative cell reference for B2. We have been using Relative cell references throughout this book. This is Excel's default, and it works like this when you copy a formula:
The formula is = A1 + A2. The answer is in cell B2. When copying the formula to cell B3 Excel will note that the cells for the formula start UP one Row, and LEFT one column. When you paste the formula somewhere else, Excel will not paste the formula, but paste this UP one then Left one. So starting at Cell B3, which is where we're pasting to, go UP one Row. This takes you to row 2. Then go one column Left. This takes you to Column A. So the start for the new formula is cell A2. Your formula will now read = A2 + A3. As there is nothing in cell A3, the formula is really = 25 + 0. Which gives the answer 25.
And that's Relative cell referencing.

Absolute cell references in Microsoft Excel

If you want to keep a reference to the original cells, A1 and A2, you need to use Absolute cell references. Absolute cell referencing is done with dollar signs.
Change your formula in cell B2 to this:
= $A$1 + $A$2
Then copy and paste the new formula to cell B3. You should now get the answer you were looking for: 45. Your spreadsheet will look like the one below:
Absolute cell reference
To recap, then:
  • When you want to copy and paste formulas, use Absolute cell references
  • To use Absolute referencing, place a dollar sign before the Column letter and a dollar sign before the Row number (You can mix absolute and relative cell references, but we won't go into that.)

In the next part of this section, we'll take a look at Named Ranges.

Comments

Popular posts from this blog

Beginners PHP  -This is a complete and free PHP programming course for beginners. It's assumed that you already have some HTML skills. But you don't need to be a guru, by any means. If you need a refresher on HTML, then click the link for the Web Design course on the left of this page. Everything you need to get started with this PHP course is set out in section one below. Good luck! Home Page > PHP Section One - An Introduction to PHP 1. What is PHP and Why do I need it? 2. What you need to get started 3. Installing and testing Wampserver 4. Troubleshooting > PHP Two - Getting Started With Variables 1. What is a Variable? 2. Putting text into variables 3. Variables - some practice 4. More variable practice 5. Joining direct text and variable data 6. Adding up in PHP 7. Subtraction 8. Multiplication 9. Division 10. Floating point numbers > PHP Three - Conditional Logic 1. If Statements 2. Using If Statements 3....
Javascript Tutorials for the Beginner - Welcome to the Home and Learn course for Javascript. Although it is aimed at complete beginners to the subject we do assume that you have some knowledge of HTML and a little CSS. You don't have to be an expert, though. Just the basics will do. (If you're not sure about the HTML then see our Web Design course.) You don't need to buy any software for this Javascript course - you probably already have everything you need to get started.   > Section One: Getting Started 1. Software needed 2. Our Javascript Templates 3. A little word about debugging Home Page > Section Two: The Browser 1. A First Script 2. Javascript Tag Placement 3. The Browser Object Model 4. Browser Window Methods 5. The Document Object Model > Section Three: Javascript Programming Basics 1. Javascript Variables 2. Math Operators 3. Operator Precedence 4. IF Statements 5. IF ... Else 6. Comparison Operators 7...

PRATYUSHA HOME

Hi interesting readers, Prathysha NGO, Chennai. Bala gurukul orphange, chennai. Pratyusha support, Hyderbad. Krr oldage home, Vizag. Disa foundation.......................................................... so on..................... Join hands with us for a good cause. Thank you all. Contact  us on our  whatsapp no:  8939374254    for the more details. You can pay through Paytm scanner. for each donor we will give an online PDF book as a gift. Thank you Pratyusha Home