+ Reply to Thread
Results 1 to 10 of 10

A formula to vlookup with condition (b or s)

  1. #1
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Dubai
    MS-Off Ver
    Excel For Mac V16 365
    Posts
    145

    A formula to vlookup with condition (b or s)

    Hello,

    thanks for checking.

    i am looking for a formula that can vlooup according to the conditon,

    in the sheet attached if col F =b then vlookup the table on the right

    if col F=s then vlookup the same table but in negative sign


    how can i put the check of b and s in a formula that can be applied to whole column.


    thanks in advance

    Gokz
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: A formula to vlookup with condition (b or s)

    Quote Originally Posted by gokzee View Post
    if col F=s then vlookup the same table but in negative sign
    Could you please explain what do you mean about Negative Sign? If possible add the expected output also.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Dubai
    MS-Off Ver
    Excel For Mac V16 365
    Posts
    145

    Re: A formula to vlookup with condition (b or s)

    just the opposite symbol for the values in the vlookup table.


    for ex: if its "s" then formula =vlookup(....)

    if its "b" then formula = -vlookup(....)

    hope you got it.

    thanks

    gokz

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: A formula to vlookup with condition (b or s)

    In H2 cell
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Drag it down

  5. #5
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Dubai
    MS-Off Ver
    Excel For Mac V16 365
    Posts
    145

    Re: A formula to vlookup with condition (b or s)

    hello sixth sense,

    thanks fr the reply

    but i am getting the same value (100) in the whole column with this formula.

    any idea?

    thanks

    Gokz

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: A formula to vlookup with condition (b or s)

    Your file Calculation mode is set to Manual, So press F9 to force calculation or Press F2 on each formula cell. OR change it to Automatic and press F9 to force the calculation.

  7. #7
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Dubai
    MS-Off Ver
    Excel For Mac V16 365
    Posts
    145

    Re: A formula to vlookup with condition (b or s)

    that works awesome!!

    thank you Sixthsense ...u rock as always

  8. #8
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: A formula to vlookup with condition (b or s)

    This one much shorter....

    Make sure set your calcution to "Automatic" not "Manual"

    In H2: =VLOOKUP(G2,M$5:N$7,2,0)*SIGN((F2="s")-0.1)

    copy down

  9. #9
    Forum Contributor
    Join Date
    11-08-2012
    Location
    Dubai
    MS-Off Ver
    Excel For Mac V16 365
    Posts
    145

    Re: A formula to vlookup with condition (b or s)

    that tooo works well...

    Thanks

  10. #10
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: A formula to vlookup with condition (b or s)

    You're Welcome!

+ 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