+ Reply to Thread
Results 1 to 4 of 4

Using VLOOKUP with cell references

  1. #1
    Registered User
    Join Date
    04-30-2013
    Location
    Cranfield
    MS-Off Ver
    Excel 2007
    Posts
    68

    Using VLOOKUP with cell references

    Hi All,

    I have a problem with a peice of code and I'm sure it's just the syntax that I'm getting wrong.

    The following code is just a test to input a Vlookup formula to reference the cell next to itself. The adjacent cell will change which is why I can't just put in a static cell reference...

    Please Login or Register  to view this content.
    Please help!

  2. #2
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: Using VLOOKUP with cell references

    Remove the .Value from the left hand side of the equation. Excel is confused as the right side is a string.
    Perhaps it was the Noid who should have avoided me...
    If you are satisfied with my solution click the small star icon on the left. Thanks
    1. Make a copy of your workbook and run the following code on your copy (just in case)
    2. With excel open, press ALT+F11 to open the Visual Basic Editor (VBE). From the "Insert" menu, select "Module".
    3. Paste the code from above into the empty white space. Close the VBE.
    4. From the developer tab, choose "Macros", select the Sub Name, and click "Run".

  3. #3
    Registered User
    Join Date
    04-30-2013
    Location
    Cranfield
    MS-Off Ver
    Excel 2007
    Posts
    68

    Re: Using VLOOKUP with cell references

    I've tried that but I get the same error (Application-defined or object-defined error)

    Please Login or Register  to view this content.
    Last edited by JamesFletcher; 08-15-2013 at 05:39 AM.

  4. #4
    Registered User
    Join Date
    04-30-2013
    Location
    Cranfield
    MS-Off Ver
    Excel 2007
    Posts
    68

    Re: Using VLOOKUP with cell references

    I managed to fix it...I was clearly over-complicating things again!

    Please Login or Register  to view this content.

+ 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] VLOOKUP Error when lookup value references a cell that is a sum.
    By Joeg101 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-31-2013, 01:36 PM
  2. Replies: 3
    Last Post: 01-22-2013, 05:38 AM
  3. vlookup of multiple references in same cell
    By darthshani in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-11-2009, 01:17 PM
  4. vlookup using absolute cell references in VBA
    By Colin Vicary in forum Excel General
    Replies: 3
    Last Post: 01-23-2007, 09:45 AM
  5. vlookup with linked cell references
    By JAB in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-20-2006, 01:00 PM

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