+ Reply to Thread
Results 1 to 6 of 6

VBA Convert Index to Direct Link

  1. #1
    Registered User
    Join Date
    04-15-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    2

    VBA Convert Index to Direct Link

    Hi I am looking to convert a series of Index formulas to direct links.

    I have found topics which do this for Indirect formulas but have been unable to find anything on the topic of indexes.

    Example Formula : INDEX('Sheet 2'!$1:$1048576,MATCH($A4,'Sheet 2'!$A:$A,0),MATCH(F$1,Sheet2'!$1:$1,0))

    Which would return 127 and 50 in the row_num and column_num: INDEX('Sheet 2'!$1:$1048576,127,50)

    I this instance I would want a direct link through to 'Sheet 2'!AX127 because the array range is $1:$1048576.

    If the array was B2:BZ200 then it would return AY128

    The last consideration is that there may be multiple indexes in the formula which needs converting.

    I would really appreciate some guidance on the subject.
    Regards Bean

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: VBA Convert Index to Direct Link

    You may start with something like:
    =address(MATCH($A4,'Sheet 2'!$A:$A,0),MATCH(F$1,Sheet2'!$1:$1,0))
    or
    =address(MATCH($A4,'Sheet 2'!$A:$A,0)+1,MATCH(F$1,Sheet2'!$1:$1,0)+1,4)
    (here array starts in B2 and result type is relative address)

    If you see it works as expected, it would be a good point to start coding in VBA, probably using EVALUATE
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    04-15-2013
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: VBA Convert Index to Direct Link

    Error Post....

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: VBA Convert Index to Direct Link

    Could you please explain your last post.
    Was your problem solved?

  5. #5
    Registered User
    Join Date
    01-20-2020
    Location
    Canada
    MS-Off Ver
    365
    Posts
    1

    Re: VBA Convert Index to Direct Link

    I'm having a similar problem, wonder if anyone could help

    I have a formula:
    =INDEX(Sheet1!$1:$1048576,$D15,MATCH(G$14,Sheet1!5:5,0))

    Which I would like simplified down to its direct equivalent
    =B8

    I am attaching a sheet

    Also in case it helps, this is not the answer, but on a related point there is an example of how to trace from an Index Match Match function to the ultimate source:
    google stackoverflow VBA to trace precedents of index function
    [sorry the software won't let me post direct link]

    Thanks in advance
    Attached Files Attached Files

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: VBA Convert Index to Direct Link

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread

+ 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] Clear cells if adjacent cell contains certain text from a direct link
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-01-2016, 12:23 PM
  2. [SOLVED] Convert Indirect formulas to direct link
    By hsilva in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-05-2014, 01:37 AM
  3. 2 link buttons . so if I click on one it direct me to the other
    By netanel99 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-13-2013, 09:46 AM
  4. direct link
    By mohan.r1980 in forum Excel General
    Replies: 1
    Last Post: 11-17-2010, 04:21 AM
  5. Replies: 0
    Last Post: 02-09-2005, 05:06 PM
  6. Can I get excel to auto direct me to the source of a link?
    By jimmy995 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-09-2005, 04:06 PM
  7. direct link to name_box
    By Edcel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-28-2005, 03:34 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