+ Reply to Thread
Results 1 to 6 of 6

Vlookup and If statement

Hybrid View

  1. #1
    Registered User
    Join Date
    11-21-2012
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    3

    Vlookup and If statement

    Hello,

    my name is katie and this is my first post.

    I have tried and failed miserably to get a formula which will look up data based on two different crtierias and if both matched return the relevant value.

    The data that I want to return is organised as per the below:

    entity code value



    5B 0121983 30,134.47
    5B 0121936 97,804.38
    5A 0121983 48,611.77
    5A 0121934 217.68
    5A 0121933 11,429.07
    5A 0121932 16,239.06
    5A 0121925 68,607.58
    5A 0121928 18,446.06
    5A 0121929 3,003.78


    And I am trying to return it to the below table:

    codes 5A 5B
    0121983 x
    0121936
    0121935
    0121934
    0121933
    0121932


    Therefore I would like a formula which would look for Entity 5A in table 1 and then look for the codes in Table 2 and if both matched return the relevant data from table 1. So for 'x' in table 2 this would be 48,611.77.

    Any ideas?

    many thanks
    Katie

  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: Vlookup and If statement

    try like this
    Attached Files Attached Files
    "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
    Forum Contributor satputenandkumar0's Avatar
    Join Date
    11-08-2012
    Location
    Pune, India
    MS-Off Ver
    Office xp & Office 2007
    Posts
    398

    Re: Vlookup and If statement

    Hi, welcome to the forum!

    use below formula

    =(TRIM(MID(A10,4,7)))

    ------------------------------------------------------------------------------------------
    CLICK the STAR icon on the left side below their user name to say thank you to those who had helped you. Thanks.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Forum Contributor satputenandkumar0's Avatar
    Join Date
    11-08-2012
    Location
    Pune, India
    MS-Off Ver
    Office xp & Office 2007
    Posts
    398

    Re: Vlookup and If statement

    Hi, welcome to the forum!

    use below formula

    =(TRIM(MID(A10,4,7)))

    ------------------------------------------------------------------------------------------
    CLICK the STAR icon on the left side below their user name to say thank you to those who had helped you. Thanks.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.

  5. #5
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Vlookup and If statement

    Hi
    See attachement. I ended up w/ this formula.. Array entered

    =INDEX($C$2:$C$10,MATCH(1,(I$1=$A$2:$A$10)*($H2=$B$2:$B$10),0))
    Attached Files Attached Files
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  6. #6
    Registered User
    Join Date
    11-21-2012
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Vlookup and If statement

    thanks guys for your help: used martindwilson soln and thisdid the trick,

    thanks!

+ 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