+ Reply to Thread
Results 1 to 8 of 8

vlookup and concotanate formula returning a reference error

  1. #1
    Registered User
    Join Date
    03-18-2010
    Location
    penang, malaysia
    MS-Off Ver
    Excel 2003
    Posts
    7

    vlookup and concotanate formula returning a reference error

    Hello, it’s my first post here but I’ve looked through the other threads concerning this issue and they don’t seem to solve my issue. First, I am trying to create a codebook that dynamically populates itself. The codebook contains a concatenated code, based on pieces of text from a transcript, that form a code. Second, I am trying to use the concatenated code as the basis for a vlookup function which will automatically populate a cell if two concatenated codes are the same and return a text value (code memo). If they are not the same I would like to add the text “PLEASE INSERT A CODE MEMO”.

    I have created the code book by returning the value from another sheet ‘transcript’. I have inserted this formula from columns B to F in the codebook sheet.
    e.g =transcripts!H2

    I have then concatenated all these values together using the formula
    =CONCATENATE(B2&":"&C2&":"&D2&":"&E2&":"&F2)

    In the transcript sheet I have entered another formula that returns that concatenated value. I then attempt a vlookup from the concatenated value. However, the vlookup returns a REF error. I’m not too sure how to solve this ref error so any help would be much appreciated.
    Lastly, because other people will work on this workbook is it possible to lock the formulas apart from the ones that are not the same and return the text “PLEASE INSERT A CODE MEMO”?
    Attached is the workbook.

    Regards,

    Mark
    Attached Files Attached Files

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: vlookup and concotanate formula returning a reference error

    Mark where is the VLOOKUP formula that you tried? Where and what this formula do you want to lookup?
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Contributor
    Join Date
    09-11-2009
    Location
    Paris
    MS-Off Ver
    Excel 2003
    Posts
    102

    Re: vlookup and concotanate formula returning a reference error

    Hi,
    Try this formula:
    =VLOOKUP(M2,'Code book'!$A:$G,7,0)

  4. #4
    Registered User
    Join Date
    03-18-2010
    Location
    penang, malaysia
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: vlookup and concotanate formula returning a reference error

    Hello, thanks for responding so quickly.

    The vlookup formula is

    =VLOOKUP(M2,'Code book'!A:G,'Code book'!A1,2)

    There are two sheets in the workbook. The first 'transcript' sheet contains the vlookup function and the codebook sheet contains the value I want to lookup

  5. #5
    Registered User
    Join Date
    03-18-2010
    Location
    penang, malaysia
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: vlookup and concotanate formula returning a reference error

    Thank you very much duanzhuanming, that formula works great. Why does it work with a 0 instead of 2 in the reference value?

  6. #6
    Forum Contributor
    Join Date
    09-11-2009
    Location
    Paris
    MS-Off Ver
    Excel 2003
    Posts
    102

    Re: vlookup and concotanate formula returning a reference error

    Your formula is not correct...
    =VLOOKUP(M2,'Code book'!A:G,'Code book'!A1,2)
    In your sheet: 'Code book'!A1 is not a number for column position in which the formula will return value.
    'Code book'!A1 =Concatenated code
    Formula Syntax is false!

  7. #7
    Forum Contributor
    Join Date
    09-11-2009
    Location
    Paris
    MS-Off Ver
    Excel 2003
    Posts
    102

    Re: vlookup and concotanate formula returning a reference error

    Quote Originally Posted by okeefe87 View Post
    Thank you very much duanzhuanming, that formula works great. Why does it work with a 0 instead of 2 in the reference value?
    You can type False or True
    False =0 --> VLOOKUP will find only an exact match
    True =1

  8. #8
    Registered User
    Join Date
    03-18-2010
    Location
    penang, malaysia
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: vlookup and concotanate formula returning a reference error

    Thanks for the help and the tips. They are much appreciated.

    Best regards,

    Mark

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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