+ Reply to Thread
Results 1 to 8 of 8

Shorthand way of writing repeated formula/links to workbooks in a cell

  1. #1
    Registered User
    Join Date
    09-30-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    85

    Shorthand way of writing repeated formula/links to workbooks in a cell

    Hi all,

    Probably a simple solution but if I have a repeated formula or link to another workbook in a cell, is there a way to repeat it just using "" or something similar?
    Such as:


    =IF(ISERROR(LOOKUP(10^99,--MID("|"&''C:\A\[Long_workbook_name.xls]Long_sheetname'!B28,SMALL(IF(((--ISNUMBER(--("0"&MID(SUBSTITUTE(" "&'C:\A\[Long_workbook_name.xls]Long_sheetname'!B28," ","|"),ROW($1:$25),1)))=0)*ISNUMBER(--(MID(SUBSTITUTE(" "&'C:\A\[Long_workbook_name.xls]Long_sheetname'!B28," ","|"),ROW($2:$26),1)))),ROW($2:$26)),2),ROW($1:$25)))),LOOKUP(10^99,--MID("|"&B28,SMALL(IF(((--ISNUMBER(--("0"&MID(SUBSTITUTE(" "&B28," ","|"),ROW($1:$25),1)))=0)*ISNUMBER(--(MID(SUBSTITUTE(" "&B28," ","|"),ROW($2:$26),1)))),ROW($2:$26)),1),ROW($1:$25))),LOOKUP(10^99,--MID("|"&B28,SMALL(IF(((--ISNUMBER(--("0"&MID(SUBSTITUTE(" "&B28," ","|"),ROW($1:$25),1)))=0)*ISNUMBER(--(MID(SUBSTITUTE(" "&B28," ","|"),ROW($2:$26),1)))),ROW($2:$26)),2),ROW($1:$25))))

    Where the link is used multiple times, and the same formula used again in the IF statement. Any help would be greatly appreciated.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Shorthand way of writing repeated formula/links to workbooks in a cell

    why not use a cell to store the link and then reference that in the complex formula?
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    09-30-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Shorthand way of writing repeated formula/links to workbooks in a cell

    What do you mean exactly, Andy?

    Is there no way to repeat the link with shorthand? And similarly with formulas?

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Shorthand way of writing repeated formula/links to workbooks in a cell

    no short hand that I know of.

    I'm suggesting that in A1 use have

    A1: ='C:\A\[Long_workbook_name.xls]Long_sheetname'!B28

    and then you formula would be

    =IF(ISERROR(LOOKUP(10^99,--MID("|"&A1,SMALL(IF(((--ISNUMBER(--("0"&MID(SUBSTITUTE(" "&A1," ","|"),ROW($1:$25),1)))=0)*ISNUMBER(--(MID(SUBSTITUTE(" "&A1," ","|"),ROW($2:$26),1)))),ROW($2:$26)),2),ROW($1:$25)))),LOOKUP(10^99,--MID("|"&A1,SMALL(IF(((--ISNUMBER(--("0"&MID(SUBSTITUTE(" "&A1," ","|"),ROW($1:$25),1)))=0)*ISNUMBER(--(MID(SUBSTITUTE(" "&A1," ","|"),ROW($2:$26),1)))),ROW($2:$26)),1),ROW($1:$25))),LOOKUP(10^99,--MID("|"&A1,SMALL(IF(((--ISNUMBER(--("0"&MID(SUBSTITUTE(" "&A1," ","|"),ROW($1:$25),1)))=0)*ISNUMBER(--(MID(SUBSTITUTE(" "&A1," ","|"),ROW($2:$26),1)))),ROW($2:$26)),2),ROW($1:$25))))

  5. #5
    Registered User
    Join Date
    09-30-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Shorthand way of writing repeated formula/links to workbooks in a cell

    Thanks Andy, although is it possible to have just the Workbook and sheet reference without the cell reference in A1 above? And then refer to the cell you want in the worksheet within the IF formula. As the issue is I have many links to a single workbook/sheet but the cells are all different.

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Shorthand way of writing repeated formula/links to workbooks in a cell

    No because then you would need to use the INDIRECT functon and that does not would on closed workbooks.
    Perhaps an alternative is to use named ranges. Via Name Manager add a named range, for example.

    EXT_B28: ='C:\A\[Long_workbook_name.xls]Long_sheetname'!B28

    =IF(ISERROR(LOOKUP(10^99,--MID("|"&EXT_B28,SMALL(IF(((--ISNUMBER(--("0"&MID(SUBSTITUTE(" "&EXT_B28," ","|"),ROW($1:$25),1)))=0)*ISNUMBER(--(MID(SUBSTITUTE(" "&EXT_B28," ","|"),ROW($2:$26),1)))),ROW($2:$26)),2),ROW($1:$25)))),LOOKUP(10^99,--MID("|"&EXT_B28,SMALL(IF(((--ISNUMBER(--("0"&MID(SUBSTITUTE(" "&EXT_B28," ","|"),ROW($1:$25),1)))=0)*ISNUMBER(--(MID(SUBSTITUTE(" "&EXT_B28," ","|"),ROW($2:$26),1)))),ROW($2:$26)),1),ROW($1:$25))),LOOKUP(10^99,--MID("|"&EXT_B28,SMALL(IF(((--ISNUMBER(--("0"&MID(SUBSTITUTE(" "&EXT_B28," ","|"),ROW($1:$25),1)))=0)*ISNUMBER(--(MID(SUBSTITUTE(" "&EXT_B28," ","|"),ROW($2:$26),1)))),ROW($2:$26)),2),ROW($1:$25))))

  7. #7
    Registered User
    Join Date
    09-30-2013
    Location
    london
    MS-Off Ver
    Excel 2010
    Posts
    85

    Re: Shorthand way of writing repeated formula/links to workbooks in a cell

    Yeah that could work, thanks for your help Andy.

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Shorthand way of writing repeated formula/links to workbooks in a cell

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/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. Locking Formula links from Other Workbooks
    By dkomin in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 08-08-2012, 04:24 PM
  2. writing values to range - first entry repeated
    By twd000 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-02-2009, 09:55 AM
  3. Links to other workbooks in formula
    By cathrandall in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-10-2008, 06:22 AM
  4. Need to write IF formula in shorthand
    By MikeX in forum Excel General
    Replies: 5
    Last Post: 08-27-2007, 02:35 PM
  5. Formula Links to seperate workbooks
    By Brokovich in forum Excel General
    Replies: 6
    Last Post: 08-11-2006, 11:35 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