+ Reply to Thread
Results 1 to 6 of 6

Using a vlookup return cell with mixed elements in a subsequent calculation

  1. #1
    Registered User
    Join Date
    12-09-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    2

    Using a vlookup return cell with mixed elements in a subsequent calculation

    Hi, I have successfully returned "EUR 0.65 " in a cell from a vlookup return.

    The problem is that i need to multiply the returned value (0.65) by a another number say 1,000 but I keep getting an error as I guess I somehow need to strip out or deal with the text element of EUR in the cell.

    Any help greatly appreciated. Thanks in advance

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Using a vlookup return cell with mixed elements in a subsequent calculation

    Try

    =VALUE(RIGHT(A1,LEN(A1)-4))

    to extract out the numeric part.
    Martin

  3. #3
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: Using a vlookup return cell with mixed elements in a subsequent calculation

    If your amounts change, for instance 0.65 one time and 12.72 another time, then try this (assuming your value is in A1, and there will always be a space between EUR and the amount):

    =VALUE(RIGHT(A1,LEN(A1)-FIND(" ",A1)+1))

    - Moo

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Using a vlookup return cell with mixed elements in a subsequent calculation

    if the answer the vlookup is giving you is "EUR 0.65" then that is text, not value - you cant do calcs on text, you need to convert it. try something like

    =VALUE(MID(A1,SEARCH(" ",A1,1)+1,6))

    adjust the references as needed
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    12-09-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Using a vlookup return cell with mixed elements in a subsequent calculation

    Excellent many thanks to all of you . Indeed the solutions offered have worked perfectly for me.

  6. #6
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: Using a vlookup return cell with mixed elements in a subsequent calculation

    if you are using the mid function to get a number and then using that number in further calculations (0.65 *1000) etc then I don't think you need to use value as excel will automatically read 0.65 as a number once its used in a mathmatical equation

    (same logic behind not using the -- in this
    =sumproduct((a1:a10=1)*(b1:b10=2))
    The Importance of INDEX - A GUIDE TO INDEX'S OTHER USES
    <--- If a post helps hit the star

+ 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