+ Reply to Thread
Results 1 to 3 of 3

VLOOKUP on changing table!!HELP!!lol

  1. #1
    Registered User
    Join Date
    07-11-2006
    Posts
    3

    VLOOKUP on changing table!!HELP!!lol

    Hi guys,

    Basically it is a simple problem but no one knows a simple solution. I am using VLOOKUP to find values fronm a table with about 40 columns, but sadly I am not in control of this table and the columns order can change (ie A becomes C and D becomes B) but I dont want to re-write the code evrytime the column changes. So basically I need a way of using VLOOKUP but not entering the column number and entering the column name so it searches for that. So for example, it will look for the column entitled 'Username' and not just the '7th column in' for example, as in a few mnths tim,e it will still be called 'Username' but may now be the 9th column in.

    Any help is appreciated. Thanks.

  2. #2
    Registered User
    Join Date
    07-11-2006
    Posts
    3
    Basically I am ideally looking to replace the column index number in the Vlookup with a column title? can this be done or does anyone know a way round this?

  3. #3
    Registered User
    Join Date
    07-07-2006
    Posts
    5
    You can use column() function instead of hard coding column number. Just use this function in Vlookup function. and also you shd subtract no.of columns from first column to first column of your array.
    =vlookup(b1,test!b1:bz100,column(test!d1)-1)

+ 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