+ Reply to Thread
Results 1 to 5 of 5

adding values from row A to a constant in row B

  1. #1
    Registered User
    Join Date
    04-29-2021
    Location
    Surprise AZ
    MS-Off Ver
    365
    Posts
    1

    adding values from row A to a constant in row B

    Newbie here. I have Excel sheet with Columns A , B and C. Column A is the number of useful years left on a piece of equipment. Column B is the starting year. Column C will be the final year of equipment life or Column A + Column B so that formula is =SUM(A+B). Easy to do, except I have 271 rows of differing numbers for Column A. and B. Is there a formula that would basically say =SUM(A+B) where A changes to whatever row it's inserted on so if it is applied to Row 200 it will select Row 200's A value? Or am I going to have to do all 271 rows separately?

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: adding values from row A to a constant in row B

    not sure what you mean by doing 271 rows separately but, here is what I think is the formula you need in cell C2... =A2+B2
    then you click out of the cell, then click back in the cell and hover your cursor over the bottom right corner of the cell and the cursor should change to a bold plus sign and the bottom right of the cell will have a small black box in it. Just double click on that and it will auto populate the same formula (changing the rows as it goes down) all the way down until there are no more cells with values in in col B. Hope that helps.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: adding values from row A to a constant in row B

    now, going by your post title of adding values in col A to a constant in col B, if you mean you want all the numbers in cells A2 through A271 to have the value in B2 added to them, you would use this instead... =A2+B$2 and populate that the whole way down. The use of dollar signs locks in certain cells, for example $B2 locks in col B but not row 2, so you can drag it to the right and it will always refer to what is in col B. B$2 locks in row 2 so as you drag the formula to the right and down, it will continue to refer to row 2 as you go down but as you go to the right it will change to C$2 then D$2 etc. $B$2 will lock in cell B2 and no matter which direction you drag the formula it will continue to point to cell B2.
    Maybe that is what you meant?

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: adding values from row A to a constant in row B

    then there is one other way I can think of to add (or multiply or divide or subtract) a whole column of numbers by a specific number.
    so you put the constant in a cell, say B2, then copy that cell, then highlight the whole column of numbers you want to add it to (or multiply or whatever) and you do a right click and the paste box will open, select paste special and a box will open, then you go to operation and click on Add then OK and what is in cell B2 will be added to the each cell in col A that you highlighted, so if the number in B2 was 2, 2 will then be added to each cell you highlighted in col A. And of course if you don't like the results you can hit undo.

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: adding values from row A to a constant in row B

    Quote Originally Posted by azpackrat View Post
    that formula is =SUM(A+B)
    Don't use SUM unless you are providing a list of numbers to add together. That formula, for row 1, is

    =A1+B1

    Once you put that formula in, you can copy that down the column all the way to row 271. This is the whole power of Excel and a very fundamental feature. If you do that, the formula in row 2 will automatically be

    =A2+B2

    row 3 will be

    =A3+B3

    all the way down to

    =A271+B271

    If you want to use the value in B1 for every row then follow Sam Capricci's second post.

    =A1+B$1

    Your question can be interpreted two different ways. Please read it over and see if you can clarify this.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Adding Cells Characters Function not getting constant values
    By JLeith in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-12-2017, 12:14 PM
  2. Adding Cells Characters Function not getting constant values
    By JLeith in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-09-2017, 01:22 AM
  3. Replies: 0
    Last Post: 06-09-2017, 01:12 AM
  4. [SOLVED] Adding a constant values to certain cells in excell at a time
    By oluagbe1 in forum Excel General
    Replies: 5
    Last Post: 04-17-2017, 05:19 PM
  5. Replies: 1
    Last Post: 11-14-2016, 01:17 AM
  6. Adding a constant column
    By Trojnfn in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 01-17-2014, 07:04 PM
  7. [SOLVED] Adding constant values using object variable coding
    By highlystrung in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-01-2013, 05:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1