+ Reply to Thread
Results 1 to 8 of 8

Incorrect Vlookup syntax

  1. #1
    Forum Contributor
    Join Date
    08-16-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    132

    Incorrect Vlookup syntax

    Another vlookup thread on the forums.... sorry!

    I have the following vlookup that is not working, and I can't figure out why.

    Please Login or Register  to view this content.
    So - the code is working fine, apart from the vlookup line. Here is what I'm trying to do:

    My FOR statement is in column C. Here is a breakdown of what I am trying to get the code to do:

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    When I execute the code, I just get a blank cell in column S. There's no data there - so the formula is not executing correctly, but I can't figure out where the error is happening.

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Incorrect Vlookup syntax

    I do not think formula is correct - you may try:
    Please Login or Register  to view this content.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  3. #3
    Forum Contributor
    Join Date
    08-16-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    132

    Re: Incorrect Vlookup syntax

    Hmm... nope - still doesn't work. I'm wondering if there's an issue with the RC-15 or the C1:C2 that I'm using.... Is my syntax correct for the cells I'm trying to reference?

  4. #4
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    861

    Re: Incorrect Vlookup syntax

    you said :
    'look at column D of this sheet: 15 rows BACK from column S
    rows!!! not columns! carefull!
    so what's with the Data!C1:C2 ?

    have you tried
    Please Login or Register  to view this content.
    Last edited by bulina2k; 03-04-2014 at 05:03 PM.
    .. and don't forget to have fun!
    Bogdan.

    mark SOLVED and Add Reputation if my answer pleases you

  5. #5
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Incorrect Vlookup syntax

    If you comment out .Value = .Value line, what formula is put in cell?

  6. #6
    Forum Contributor
    Join Date
    08-16-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    132

    Re: Incorrect Vlookup syntax

    Data!C1:C2 is the first part of the vlookup - it defines which sheet I'm looking on, (Data), and the C1:C2 says look in column 1 to column 2 - find a match in the second column (,2), and False (,0)

    But yes - I did mean "15 COLUMNS back from column s"

    Your suggestion does not work as it's missing integral vlookup data.

  7. #7
    Forum Contributor
    Join Date
    08-16-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    132

    Re: Incorrect Vlookup syntax

    Quote Originally Posted by Izandol View Post
    If you comment out .Value = .Value line, what formula is put in cell?
    Nothing. It's blank.

    and just a side note - InfBranchList is pointing to the correct file, the sheet's name IS Data, and the data is in columns 1 and 2.

  8. #8
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Incorrect Vlookup syntax

    What is value of lastrow and is there on error resume next statement somewhere?

    .......... 'code that I don't need to show here.........
    Perhaps this code must be shown.

+ 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 Shows incorrect value.
    By thilag in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-26-2014, 03:51 AM
  2. [SOLVED] Incorrect Syntax
    By ImStevenB in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-14-2014, 05:03 PM
  3. IF(COUNTIF statement seems to have incorrect syntax
    By dwiseman in forum Excel General
    Replies: 2
    Last Post: 04-27-2010, 10:10 AM
  4. Incorrect syntax near '#' problem when returning to MS Query fromExcel
    By Steen Persson (DK) in forum Excel General
    Replies: 0
    Last Post: 03-07-2006, 11:30 AM
  5. [SOLVED] Incorrect syntax near '#' problem when returning to MS Query fromExcel
    By Steen Persson (DK) in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2006, 11:30 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