+ Reply to Thread
Results 1 to 8 of 8

cannot copy formula to below cell with numerical increase in increments of 1

  1. #1
    Registered User
    Join Date
    12-13-2011
    Location
    Limerick, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    4

    cannot copy formula to below cell with numerical increase in increments of 1

    Hi,
    I am a new user here, thanks in advance for any help you may be able to offer.
    I have a formula that links a cell to a cell in another excel document.
    I need to use this formula many times, linking it to many different documents. all these documents are saved as job numbers, 8202, 8203, 8204 etc.

    ='I:\Common\DSL\[8109.xlsx]Sheet1'!D$7

    Thats the formula I am using. by using the dollar signs i am able to drag the formula into the next cells in a row, just the column will change and the row number will remain 7.
    However, I need to drag this formula into the cells beneath, and wish to have the 8109 to change to 8110, 8111, 8112 etc, referring to the next document to link to.

    It is possible to do this? I am not familiar with VB, hopefully there might be a simple solution.

    Best Regards,
    Fergal
    Last edited by Special.Agent; 12-13-2011 at 07:05 AM.

  2. #2
    Registered User
    Join Date
    12-13-2011
    Location
    Limerick, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: formula trouble

    done. although i dont know how to phrase it

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: cannot copy formula to below cell with numerical increase in increments of 1

    That portion of the formula does not "increment" that way when you copy downward. I am assuming all of these links are to closed workbooks from which you are retrieving info?

    There is an ADDIN called MOREFUNC you could install that would give you 100s of additional functions, one of which is called INDIRECT.EXT(), a function that would allow you to "construct" a reference with text strings and in doing so you could create a formula that would increment that particular "string" the way you want as you copy it down. INDIRECT.EXT() would assemble the pieces of the reference to create the final reference, then retrieve the data from that closed workbook.

    http://www.excelforum.com/excel-gene...ndirect.html#2


    Once you've installed MOREFUNC, the formula you could try to start would look something like:

    =INDIRECT("'I:\Common\DSL\[" & ROW($A8109) & ".xlsx]Sheet1'!" & ADDRESS(7,COLUMN(D1)))

    ...copied across from there.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    12-13-2011
    Location
    Limerick, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: cannot copy formula to below cell with numerical increase in increments of 1

    Hi,

    Many thanks for your above, however it is beyond my capabilities at present.
    I wonder is there another way for me to do this? I'll post exactly what I wish to achieve, maybe there is a simpler solution:

    I have an excel sheet "Ships Log" containing maybe 30 different columns.
    the number of rows will be in the hundreds, each job uses a new row.
    Each row is populated with times and other information relating to that job.
    The difficulty is that this worksheet is so large, and linked to other sheets in the same workbook, that entering the information becomes difficult and somewhat messy.
    To solve this I had hoped to create an excel file for each job, the information entered here would automatically be updated to the "Ships Log".
    any other docs we have would then draw the required information from the ships log.

    Does that make sense? any ideas on how I could do this with relative ease?

    Many thanks again for reading
    Fergal

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: cannot copy formula to below cell with numerical increase in increments of 1

    I didn't have any problems understanding the scenario. It is a common one. The way to resolve this with formulas is to install the MOREFUNC addin, which is not beyond your capabilities.


    On the other hand, I wouldn't do what you're doing, if using Excel as a "database" (which it isn't!), then the data should be kept in one workbook, actually in one sheet, 1 row per project.

    Then you can create other sheets that "draw" from that one database sheet to display your project information in a cool "report" format, and simply changing one key cell on the form would draw/display a different project. This is far superior working environment than the one you're trying for.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: cannot copy formula to below cell with numerical increase in increments of 1

    You may be at the point you're ready to start using VBA to create a methodology of using one PROJECT sheet to enter data into, then press a button and have that data added to your DATABASE sheet for you in the proper layout. The same PROJECT sheet could have a button to "Retrieve" data from the database into the PROJECT sheet based on the Project Name you would have already entered.

    That might alleviate your messiness.

    I can help you construct a basic macro and help you understand it so you can edit it later. Post up a sample 2-sheet workbook... one sheet showing the layout of your PROJECT input, the second being the same information in a DATABASE format. You only need show one project on the two sheets for use to be able to construct the macro.

    Click GO ADVANCED and use the paperclip icon to post up a copy of your workbook.

  7. #7
    Registered User
    Join Date
    12-13-2011
    Location
    Limerick, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: cannot copy formula to below cell with numerical increase in increments of 1

    Hi Jerry,
    Thanks very much for your time on this, it really is much appreciated.
    The VBA sounds ideal and certainly worth a try. I have attached a sample worksheet, it doesn't have all the columns that the final sheet will have but should be ok as an example.
    Best Regards,
    Fergal
    Attached Files Attached Files

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: cannot copy formula to below cell with numerical increase in increments of 1

    This will allow you to designate in row1 what cells are to be collected from each source file (code) entered in column B. When the entry is made in column B, a string is created using that code and the cell reference from row1, then entered into that row, continuing across the row.
    Please Login or Register  to view this content.
    This macro is in the sheet module.
    Attached Files Attached Files

+ 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