+ Reply to Thread
Results 1 to 10 of 10

Excel has stopped adding numbers when extending a formula to adjacent cells

  1. #1
    Registered User
    Join Date
    10-26-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2016
    Posts
    56

    Excel has stopped adding numbers when extending a formula to adjacent cells

    Hello! For some reason Excel isn't autofilling the formula for me. This is what I am using:

    =VLOOKUP($A5,TEAM!$B:$MZ,23,FALSE)

    When I select the cell formula extension button thing and drag it to the right, the formula copies exactly into the next cell. If I select multiple cells starting from 19-23 and then drag, excel just repeats the formula over, (19, 20, 21, 22, 23, 19, 20, 21, 22, 23, 19, 20...) This is seriously frustrating as I have to click into the formula bar on each cell and change the value of the column lookup.

    I can't keep going manually as I need to go to about 300 cells...

    Any ideas as to why this is happening and how to fix it?

    Thanks!

  2. #2
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Excel has stopped adding numbers when extending a formula to adjacent cells

    Select ONE cell and grab the "button" and drag as far as you need to go to the right. When you make a selection the way that you have, the copy button copies that selection over and over again.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  3. #3
    Registered User
    Join Date
    10-26-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2016
    Posts
    56

    Re: Excel has stopped adding numbers when extending a formula to adjacent cells

    Sorry I wasn't clear. I usually use just one cell and I have tried it in this but it is still pasting the value exactly as the previous cell. So I selected multiple cells to try and make Excel see a pattern, yet it just repeated itself..

    I don't know what's going on.

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Excel has stopped adding numbers when extending a formula to adjacent cells

    Does the cell that you have a formula in have references like $A$1 Dollar signs before the Letter and Number or in the case of dragging to the right a cell reference like A$1 ? The $ makes the reference absolute (unchanging) If the $ is in front of the letter the column reference stays the same, if it is in front of the number the number (row number) stays the same. If there is a $ in front of both the letter and number then the cell reference will not change.

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Excel has stopped adding numbers when extending a formula to adjacent cells

    =VLOOKUP($A5,TEAM!$B:$MZ,23,FALSE) what do you want to increment? you want the 23 to go to 24 ,25,etc?
    replace the 23 with

    COLUMNS($A$1:W$1)

    =VLOOKUP($A5,TEAM!$B:$MZ,COLUMNS($A$1:W$1),FALSE)

    if you want to start at 19 use
    COLUMNS($A$1:S$1)

    =VLOOKUP($A5,TEAM!$B:$MZ,COLUMNS($A$1:s$1),FALSE)

    when dragged/filled across that will increment by 1 each time
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  6. #6
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520

    Re: Excel has stopped adding numbers when extending a formula to adjacent cells

    Try using a horizontal incrementer for the 3rd param
    eg: COLUMNS($A:A)+22 to replace the "23" in your vlookup
    =VLOOKUP($A5,TEAM!$B:$MZ,23,FALSE)

    viz, Try it like this in the startcell:
    =VLOOKUP($A5,TEAM!$B:$MZ,COLUMNS($A:A)+22,FALSE)
    Now it should increment properly as you copy across

    And if you need to increment it as you copy DOWN,
    use eg: ROWS($1:1)+22
    --------------------
    Any good? Wave it, hit the little star at the bottom left of my responses

  7. #7
    Registered User
    Join Date
    10-26-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2016
    Posts
    56

    Re: Excel has stopped adding numbers when extending a formula to adjacent cells

    No, the formula I first pasted was taken directly from my workbook.

    =VLOOKUP($A5,TEAM!$B:$MZ,23,FALSE)

    The idea is to match the value in A5 on my current worksheet, to a range on a second worksheet (TEAM), the range is B:MZ. This is why I have $A and $B:$MZ, as I don't want the ranges to change.

    I am trying to change the column value automatically 23 > 24 > 25 by dragging the format button. However when I do it returns the exact same formula with column 23 in my range as the target column.

    I have put a single "1" in a blank cell on the same sheet and dragged it and Excel calculates it fine, so it has to be something to do with my formula or something.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Excel has stopped adding numbers when extending a formula to adjacent cells

    Just to add another suggestion, take a look at using the INDEX/MATCH combo. If the headings are the same, then this might be a better option
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  9. #9
    Registered User
    Join Date
    10-26-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2016
    Posts
    56

    Re: Excel has stopped adding numbers when extending a formula to adjacent cells

    Oh OK I see it now, VLOOKUP doesn't calculate columns automatically? I have never seen the COLUMN formula before. Now I have it working, thank you all!

    I tried using Index/Match the last time I did something similar.. my computer simply couldn't handle the large numbers of processes, Excel just wouldn't respond. Now I find VLOOKUP much quicker and less intensive.

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Excel has stopped adding numbers when extending a formula to adjacent cells

    Quote Originally Posted by PistachioPedro View Post
    I tried using Index/Match the last time I did something similar.. my computer simply couldn't handle the large numbers of processes, Excel just wouldn't respond. Now I find VLOOKUP much quicker and less intensive.
    Im pretty sure that anything VLOOKUP can handle, INDEX/MATCH will manage just as easily, but if the vlookup is working for you, thats great (If it doesnt itch, dont scratch it, right?)

    I would still be interested to see the circumstances that you mentions though (not a big deal at all)

    Thanks for the rep

+ 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. Replies: 0
    Last Post: 05-08-2013, 05:41 AM
  2. Replies: 3
    Last Post: 11-22-2012, 11:19 PM
  3. My formula cell has stopped adding the preceding cells.
    By Miriam in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-02-2006, 10:40 AM

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