+ Reply to Thread
Results 1 to 7 of 7

Column Index Relative Value

  1. #1
    Forum Contributor
    Join Date
    10-28-2014
    Location
    Sydney
    MS-Off Ver
    Professional 2010
    Posts
    151

    Column Index Relative Value

    Hi,

    Does anyone know how to make the column_index not absolute for copying Vlookups across columns?

    The 2nd last line shows A2:T31 when it should be A33:T62.

    It would be very time consuming to change all the cells manually.

    thanks.

    =IF($C$61=1,VLOOKUP($A$61,'Team Stats (L1)'!A2:T31,2,FALSE),
    IF($C$61=3,VLOOKUP($A$61,'Team Stats (L3)'!A2:T31,2,FALSE),
    IF($C$61=5,VLOOKUP($A$61,'Team Stats (L5)'!A2:T31,2,FALSE),
    IF($C$61=10,VLOOKUP($A$61,'Team Stats (L10)'!A2:T31,2,FALSE),
    IF($C$61="S",VLOOKUP($A$61,'Team Stats (Season)'!A2:T31,2,FALSE),
    IF($C$61="A",VLOOKUP($A$61,'Home Away Stats'!A33:T62,2,FALSE),
    IF($C$61="A15",VLOOKUP($A$61,'Home Away Stats (L15)'!A33:T62,2,FALSE),
    IF($C$61="A10",VLOOKUP($A$61,'Home Away Stats (L10)'!A2:T31,2,FALSE),
    IF($C$61="A5",VLOOKUP($A$61,'Home Away Stats (L5)'!A33:T62,2,FALSE))))))))))

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,260

    Re: Column Index Relative Value

    I'm not sure if I follow your question. A2:T31 is the Table array (an without any $ signs is already not absolute). The column index is 2 (and is absolute). Maybe it's just me, but a sample worksheet, posted here, showing the problem would be easier to understand...
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Contributor
    Join Date
    10-28-2014
    Location
    Sydney
    MS-Off Ver
    Professional 2010
    Posts
    151

    Re: Column Index Relative Value

    Hi Glenn,

    Its just the A2:T31 in that last row for all cells that need changing. Im pretty good with the replace function in excel and notepad but i dont know to make this one change.

    Sorry if i confused you, the table arrays should be absolute values also.

    ...and if i make everything absolute values, that would work but the problem is the column index doesnt change and i need that to change when i copy and paste.
    Last edited by prudential; 11-08-2014 at 10:44 AM.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,260

    Re: Column Index Relative Value

    If I understand you correctly (this time!!!), try this

    http://www.excelforum.com/excel-new-...-formulas.html

    suitably adjusted for your own circumstances (much easier for you - 3 steps, I think).

  5. #5
    Forum Contributor
    Join Date
    10-28-2014
    Location
    Sydney
    MS-Off Ver
    Professional 2010
    Posts
    151

    Re: Column Index Relative Value

    Glenn,

    I just want to change that one table array for all cells but to use the replace function I will need the "A10" so I will need the whole line to find and replace because the A2:T31 table array is needed elswhere in the formula. The only way i can distibguish it is by including the A10

    IF(C61="A10",VLOOKUP(A61,'Home Away Stats (L10)'!A2:T31

    with

    IF(C61="A10",VLOOKUP(A61,'Home Away Stats (L10)'!A33:T62

    thanks.

    P.S. Sorry, i couldnt work out how to apply the method you provided in your last message. to my situation.
    Last edited by prudential; 11-08-2014 at 11:04 AM.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,260

    Re: Column Index Relative Value

    Sorry... and Yes. There is no need for any use of wildcards in your case. Just hit CTL H and go for it.

  7. #7
    Forum Contributor
    Join Date
    10-28-2014
    Location
    Sydney
    MS-Off Ver
    Professional 2010
    Posts
    151

    Re: Column Index Relative Value

    Yeeehah, I worked it. It accepted the whole string. Thanks for your help!

+ 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. RSI (relative strength index) in VBA
    By losmi8 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 03-22-2014, 04:37 PM
  2. RSI (relative strength index) in VBA BUT with a twist!
    By Snakepit in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-02-2014, 10:20 AM
  3. Index match offset to get subsequent index values in a column
    By Andrew_Step in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2013, 02:55 PM
  4. [SOLVED] VBA for creating Index-Match every 2 rows where INDEX refer to a different column per row
    By bisaya789 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-22-2012, 03:46 AM
  5. Replies: 1
    Last Post: 10-25-2011, 07:43 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