+ Reply to Thread
Results 1 to 4 of 4

Vlookup column number alternative

  1. #1
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Vlookup column number alternative

    Hi guys, please see the formula below... is there an alternative to entering in the col number so that when you drag the formula the col num increases each time?

    =IF(VLOOKUP(C7,Overzicht!A8:L33,4,FALSE)=0,"",VLOOKUP(C7,Overzicht!A8:L33,4,FALSE))

    Cheers for looking
    Last edited by Blake 7; 01-24-2011 at 05:33 PM.
    Blake 7

    If your question has been answered, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

    If any member's response has helped to solve your problem, please consider using the scales icon on the top right of their post to show your appreciation.

    http://failblog.org/

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Vlookup column number alternative

    Try:


    =IF(VLOOKUP(C7,Overzicht!A8:L33,COLUMNS($A$1:D$1),FALSE)=0,"",VLOOKUP(C7,Overzicht!A8:L33,COLUMNS($A$1:D$1),FALSE)) copied across

    Note: You might need to make the C7 and A8:L33 absolute (at least in the column reference)

    i.e


    =IF(VLOOKUP($C7,Overzicht!$A$8:$L$33,COLUMNS($A$1:D$1),FALSE)=0,"",VLOOKUP($C7,Overzicht!$A$8:$L$33,COLUMNS($A $1:D$1),FALSE))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: Vlookup column number alternative

    Use the Column() function. If your formula doesn't appear in the first column, simply add or subtract from the Column() to get the desired number.


    So, assuming your formula starts in cell C1
    =IF(VLOOKUP(C7,Overzicht!A8:L33,COLUMN()-2,FALSE)=0,"",VLOOKUP(C7,Overzicht!A8:L33,COLUMN()-2,FALSE))

  4. #4
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: Vlookup column number alternative

    Thanks guys. cheers, all the best.

+ 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