+ Reply to Thread
Results 1 to 5 of 5

VLOOKUP and Concatenation

  1. #1
    Registered User
    Join Date
    05-17-2008
    Posts
    3

    VLOOKUP and Concatenation

    The following formula does not produce a correct result as in cells n:30 to O200 there are concatenated strings. However if I type over the concatenation the below formula will work.

    IF(ISERROR(VLOOKUP($D$4&B6,'Money Market'!$N$30:$O$200,2,FALSE)),0,VLOOKUP($D$4&B6,'Money Market'!$N$30:$O$149,2,FALSE))

    Does anybody please know how I can incoporate concatenation to make VLOOKUP work correctly or is there any other formula I should use please?

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Is there any extra spaces in D4 and or B6 ??

    Post a sample file and someone will take a look

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    05-17-2008
    Posts
    3
    If I type 1000AUD into cell N30 sheet 2 then formula cell C6 sheet 1 will work. But if I leave as is with concatenation then formula cell C6 sheet 1 will not work. Would welcome any ideas please?

    Can you see the attachment
    Attached Files Attached Files

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Change this formula

    =MID(A22,7,4)
    to
    =MID(A22,7,3)
    and drag down

    As AUD is only 3 characters long your formula was bringing an extra space hence the vlookup couldn't find a match

    VBA Noob

  5. #5
    Registered User
    Join Date
    05-17-2008
    Posts
    3

    Smile

    That worked perfectly. Thank you very much!

+ 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