+ Reply to Thread
Results 1 to 3 of 3

Using a value returned from a vlookup for further calculations

  1. #1
    Registered User
    Join Date
    04-18-2013
    Location
    Atlanta, Ga.
    MS-Off Ver
    Excel 2007
    Posts
    2

    Question Using a value returned from a vlookup for further calculations

    I have a table of Time (format 13:00), average of time n and time n+1, and Barometric pressure at time 1. I am using the formula '=VLOOKUP(INDEX('Barometric Pressures'!A2:A34,MATCH('Station 103'!D2,'Barometric Pressures'!B2:B34,1)),'Barometric Pressures'!A2:C34,3)' to return the barometric pressure of a time on another sheet. It returns the correct pressure but when I try to use that pressure in further calculations I get #VALUE on the cell for the calculation. Is there a way to extract this and only return the number to the calculation?

    Thanks
    Last edited by olsmith; 04-19-2013 at 08:38 AM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Using a value returned from a vlookup for further calculations

    you get #value errors if there is a mismatch eg you are trying to use text in a mathematical calculation eg =1*a
    what value is returned by the lookup, is it a real number,has it got spaces after it that sort of thing or what is the other part of the calculation using
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    04-18-2013
    Location
    Atlanta, Ga.
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Using a value returned from a vlookup for further calculations

    Thanks, your post led me to the solution. I had cut and pasted the barometric values from a web page. Even though I had formatted the cells as number(2) they were still being seen as cut html text. Once I went in and typed them they return the number I need and the calculation is correct.

+ 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