+ Reply to Thread
Results 1 to 7 of 7

Excel 2007 : Formula Query: Using a VLOOKUP and MID formula together

  1. #1
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Formula Query: Using a VLOOKUP and MID formula together

    Morning all,

    Hopefully a relatively easy one but it's bugging the hell out of me. Any idea why cell B2 is returning an error message rather than the month that the period number relates to?

    Cheers,

    Snook
    Attached Files Attached Files
    Last edited by The_Snook; 07-10-2012 at 06:05 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,737

    Re: Formula Query: Using a VLOOKUP and MID formula together

    Change the formula to this:

    =VLOOKUP(--MID(A2,6,2),Lookup_Pd_Mth,2,FALSE)

    MID returns a text value which does not match with the numbers in your table, so the double-minus converts the MID value to a number (you could also multiply by 1 or add zero).

    Hope this helps.

    Pete

  3. #3
    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: Formula Query: Using a VLOOKUP and MID formula together

    Try

    =VLOOKUP(MID(A2,6,2)+0,Lookup_Pd_Mth,2,FALSE)
    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.

  4. #4
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: Formula Query: Using a VLOOKUP and MID formula together

    Pete you are the man!

    Cheers mate

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,737

    Re: Formula Query: Using a VLOOKUP and MID formula together

    You're welcome, Snook - thanks for feeding back. Is it a bit drier in Liverpool compared with here?

    Pete

  6. #6
    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: Formula Query: Using a VLOOKUP and MID formula together

    OOOPSS. Again I wrote with invisible ink ....! I apologize for this

  7. #7
    Valued Forum Contributor
    Join Date
    09-09-2009
    Location
    Liverpool, England
    MS-Off Ver
    W: 2021 H: 365
    Posts
    940

    Re: Formula Query: Using a VLOOKUP and MID formula together

    Yeah it's not too bad here, overcast but dry. It seems like we've got some strange weather in the area today because the lad who sits opposite me is from West Derby and he said it was hammering down by his this morning. I've come from over the water and haven't seen a drop yet?

+ 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