+ Reply to Thread
Results 1 to 8 of 8

If function formula

  1. #1
    Registered User
    Join Date
    12-03-2012
    Location
    Ecuador
    MS-Off Ver
    Excel 2010
    Posts
    46

    If function formula

    Hi,

    Quite difficult to explain this one...

    I am looking for an 'if' function formula that says if the value in COLUMN C is equal to a value in COLUMN A, then put the value of COLUMN B which is in the same ROW as the matched value in column A in column E. Below is the table and I have attached the excel too. Would greatly appreciate any help!

    A B C E D

    # Price # (Formula should bring up)
    1 10 1 10
    2 12 2 12
    3 14 3 14
    4 16 1 10
    5 18 1 10
    6 20 7 22
    7 22 6 20

    Thanks,

    Leopold2000
    Attached Files Attached Files

  2. #2
    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
    53,048

    Re: If function formula

    the data you have supplied does not match what you are requesting? in A you have dates, in C you have numbers (1 to 7) they will never match?

    the if() function works as follows...

    =if(criteria-to-be-met, what-to-do-if-it-is-met, what-to-do-if-it-is-not-met)

    edit: i think this is what you wanted?

    =INDEX($A$1:$G$16,MATCH($J3,$C$1:$C$16,0),MATCH(I$1,$A$1:$G$1,0))
    Last edited by FDibbins; 12-05-2012 at 04:40 PM.
    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

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,723

    Re: If function formula

    Try this formula in I2 copied down

    =INDEX(B$2:B$100,MATCH(J2,C$2:C$100,0))
    Audere est facere

  4. #4
    Registered User
    Join Date
    12-03-2012
    Location
    Ecuador
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: If function formula

    Sorry the attached is correct.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-03-2012
    Location
    Ecuador
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: If function formula

    Hi couldn't get your formulas to work unfortunately! Any chance you could look at the excel I just attached (which is definetly correct!) and help me out!?

  6. #6
    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
    53,048

    Re: If function formula

    based on your latest sample, try this, copied down...

    =VLOOKUP(C2,$A$2:$B$8,2,FALSE)

  7. #7
    Registered User
    Join Date
    12-03-2012
    Location
    Ecuador
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: If function formula

    Genius. Thanks.

  8. #8
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: If function formula

    Leopold,

    Try this:

    Please Login or Register  to view this content.
    in E2, dragged down as far as required.
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

+ 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