+ Reply to Thread
Results 1 to 3 of 3

Problem dragging formulas in a Spreadsheet

  1. #1
    Registered User
    Join Date
    01-13-2012
    Location
    Kent, England
    MS-Off Ver
    Excel 2010
    Posts
    1

    Problem dragging formulas in a Spreadsheet

    Hi,

    I have a spreadsheet, which has lots of tabs and then a summary tab will collates information from each seperate sheet.

    In one column is a formula ='co450'!k22

    I have created some new tabs and have tried to drag this formula down, with the aim that the co450 number will count on i.e. co451, co452 etc. When i try and drag the formula to co part does not change, but the K22 increases. I have fixed this by making the K part an absolute formula, but still the first part will not change. I have tried copy pasted etc. as well

    Any help greatly appreciated.

    Thanks

    Peter

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Problem dragging formulas in a Spreadsheet

    Hello,

    The sheet name will not change if a formula is dragged, only the cell reference.

    If you need the sheet name to behave in a similar way, then use INDIRECT()

    =INDIRECT("co"&ROW(A450)&"!k22")

    This will return the same as =co450!k22 and when you drag the indirect formula down, the number at the end of the sheet name will be incremented by 1, as if you had entered

    =co451!k22
    =co452!k22

    and so on.

    cheers,

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,628

    Re: Problem dragging formulas in a Spreadsheet

    You'd need to use INDIRECT

    If, in cell A2, you put: "co450", no quotes and in cell B2, you put the formula: =INDIRECT("'"&A2&"'!K22")

    You can drag down and it will increment the sheet name/number and keep the cell address static.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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