+ Reply to Thread
Results 1 to 7 of 7

Excel 2007 : Vlookup -New Excel 2007 User

  1. #1
    Registered User
    Join Date
    04-27-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    10

    Vlookup -New Excel 2007 User

    Hey i am a new Excel 2007 user.
    I am using VLOOKUP function as follows-
    VLOOKUP(A3,'History'!$B2:$E2000,2,FALSE)

    Here I want to replace value "2" in "$B2" dynamically such that the new value which is available in a different cell can replace it. Suppose cell P22 has value 46, so dynamically my function becomes
    VLOOKUP(A3,'History'!$B46:$E2000,2,FALSE)


    Thanks.
    Last edited by zitu708; 04-27-2010 at 09:40 AM. Reason: New Member, Title needs revising.

  2. #2
    Valued Forum Contributor ratcat's Avatar
    Join Date
    03-07-2008
    Location
    Rural NSW, Australia
    MS-Off Ver
    Vista 2007
    Posts
    1,111

    Re: Vlookup -New Excel 2007 User

    G'day zitu and welcome to the forum,

    Try this

    =VLOOKUP(A3,INDIRECT("'History'!$B"&P22&":$E2000"),2,FALSE)

    Cheers

    RC
    Have I made you happy ??? If yes, please make me happy by pressing the http://www.excelforum.com/images/buttons/reputation-40b.png Add Reputation button in my post.
    Please don't forget to do the same to other contributors of this forum.

    Thanks
    I don't void confusion, I create it

  3. #3
    Registered User
    Join Date
    04-27-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    10

    Question Re: Vlookup -New Excel 2007 User

    Thanks a lot, but following did not work and returned error message #REF!

    =VLOOKUP($A2,INDIRECT("'History'!$B"&I22&":$AA$2000"),2,FALSE)

    Can you please look into this again?

    Regards.

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

    Re: Vlookup -New Excel 2007 User

    Are you sure the reference sheet name is History?

    Excel does not allow that name for a sheet... it says it is a reserved name!

    If you have spaces etc, you have to include in the formula where you reference the sheetname.
    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.

  5. #5
    Registered User
    Join Date
    04-27-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    10

    Question Re: Vlookup -New Excel 2007 User

    Yes you are right as Excel does not permit History as sheet name and I had sheet name as Hist ory . I have now changed the sheet name as MyHistory, but unfortunately it is still not working, May be I am still making some silly mistakes.

    =VLOOKUP($A2,INDIRECT("'MyHistory'!$B"&I22&":$AA$2000"),2,FALSE)


    Regards.

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

    Re: Vlookup -New Excel 2007 User

    Do you have a positive value in I22? If it is 0 or blank, you will get the #REF! error

  7. #7
    Registered User
    Join Date
    04-27-2010
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    10

    Thumbs up Re: Vlookup -New Excel 2007 User

    There is probably no Prize for my accepting that I was making silly mistakes.

    Value generated in cell I22 was certainly negative.

    Now this function is working absolutely fine.

    Many many thanks.

    Regards

+ 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