+ Reply to Thread
Results 1 to 8 of 8

ABS and vlookup wrong result

  1. #1
    Registered User
    Join Date
    08-30-2005
    Posts
    23

    ABS and vlookup wrong result

    Hi,

    I have this formula:
    =(VLOOKUP(A6,datas!C:E,3,FALSE)-(VLOOKUP(A6,datas!C:Q,15,FALSE))/ABS(VLOOKUP(A6,datas!C:Q,15,FALSE)))
    The result, formatted as percentage is : 1100%

    First vlookup returns :12 ; Second and third (same vlookup) return :33

    If i split the formula like below, the result is different:

    If i have the first vlookup in E6, second one in F6 and third one in G6, i will get this:
    12...33...33
    =(E6-F6)/ABS(G6)...the result will be -64%

    Can you please tell me why i don't get the same result with the big "ABS vlookup" formula?

    Thank you kindly,

    Puiuluipui

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: ABS and vlookup wrong result

    You put an extra set of Parens in the formula using vlookups..
    =(VLOOKUP(A6,datas!C:E,3,FALSE)-(VLOOKUP(A6,datas!C:Q,15,FALSE))/ABS(VLOOKUP(A6,datas!C:Q,15,FALSE)))

    using your example with cell references, that would be translated like
    =(E6-(F6)/ABS(G6))


    Try
    =(VLOOKUP(A6,datas!C:E,3,FALSE)-VLOOKUP(A6,datas!C:Q,15,FALSE))/ABS(VLOOKUP(A6,datas!C:Q,15,FALSE))

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,913

    Re: ABS and vlookup wrong result

    Deleted response as Jonmo1 has nailed the solution
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    08-30-2005
    Posts
    23

    Re: ABS and vlookup wrong result

    It's working with a new pair of brackets.

    Thank you very much,

    Puiuluipui

  5. #5
    Registered User
    Join Date
    08-30-2005
    Posts
    23

    Re: ABS and vlookup wrong result

    Thanks!!

    Puiuluipui

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: ABS and vlookup wrong result

    Glad to help

    But I'm curious
    Quote Originally Posted by puiuluipui View Post
    It's working with a new pair of brackets.
    What do you mean a "New" pair of brackets?
    My suggestion was to "Remove" a pair of brackets that didn't belong...

  7. #7
    Registered User
    Join Date
    08-30-2005
    Posts
    23

    Re: ABS and vlookup wrong result

    Hi Jonmo,

    this is my first attempt:
    =(VLOOKUP(A6,datas!C:P,3,FALSE)-(VLOOKUP(A6,datas!C:Q,15,FALSE))/ABS(VLOOKUP(A6,datas!C:Q,15,FALSE)))
    and this is with additional brackets:
    =((VLOOKUP(A6,datas!C:P,3,FALSE)-(VLOOKUP(A6,datas!C:Q,15,FALSE)))/ABS(VLOOKUP(A6,datas!C:Q,15,FALSE)))

    Thanks.

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: ABS and vlookup wrong result

    Glad to help, however I suggest this
    =(VLOOKUP(A6,datas!C:E,3,FALSE)-VLOOKUP(A6,datas!C:Q,15,FALSE))/ABS(VLOOKUP(A6,datas!C:Q,15,FALSE))

    It follows the () syntax you posted using Cell References.
    =(E6-F6)/ABS(G6)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VLookup show wrong result.
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-19-2013, 11:54 AM
  2. [SOLVED] VLOOKUP gives wrong result with TRUE for range-lookup
    By drfarmkid in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-06-2013, 06:54 PM
  3. IF/Then Getting Wrong Result
    By artiststevens in forum Excel General
    Replies: 2
    Last Post: 01-06-2011, 07:21 PM
  4. excel result return wrong calcuation result
    By garyww in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-14-2006, 06:20 AM
  5. Whatever I do I get the wrong result
    By Arishy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-20-2005, 01:40 PM

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