+ Reply to Thread
Results 1 to 5 of 5

[SOLVED] Search value in one column and write the corresponding value

  1. #1
    Registered User
    Join Date
    08-20-2012
    Location
    Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    4

    Post [SOLVED] Search value in one column and write the corresponding value

    Hello,

    I have one problem, maybe someone can help me.

    Column1 Column2 Column3
    Red White 1
    Pink Yellow 4
    Blue Green 10
    Black Red 7
    White Purple 9

    If the first value from column 1 "Red" matches one of the value from column2, then write the corresponding value from column3.
    I know that I can do with "if" and "match", but I don't know how to take the exact value of the corresponding column3.

    Could somebody give me a hint?

    Thanks alot,
    Last edited by AngelaP; 08-20-2012 at 10:53 AM. Reason: Problem solved

  2. #2
    Valued Forum Contributor
    Join Date
    12-05-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010 & 2013
    Posts
    308

    Re: Search value in one column and write the corresponding value

    Hi AngelaP

    If I read this right, you have two inputs and need to find the corresponding value.

    The attached spreadsheet has 3 examples of how to achieve this.

    Cells A1:C5 - your table.

    Cells C8:C10 - the solution.

    SUMIFS (Cell C9) and SUMPRODUCT (Cell C8) work if you only have one instance of each colour combination. If you had two White/Purples, the total would be added.

    The final version (C10) uses INDEX, MATCH and IF to find the first match then take that value. It does give a #N/A error if the first colour you enter is not matched.

    Hope this helps.

    Regards, Rob.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-20-2012
    Location
    Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Search value in one column and write the corresponding value

    Hi Rob,

    I looked at the attached file. What I want is a little bit different: search if you find Red in Column2 and put the corresponding value of RED = 7 in a New Column4, if not put 0.
    But thanks anyway, maybe I will figure it out now with index function.

    A.
    Last edited by AngelaP; 08-20-2012 at 05:29 AM.

  4. #4
    Registered User
    Join Date
    08-02-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    20

    Re: Search value in one column and write the corresponding value

    hey please let me know how to post a new query in this forum..i forgot it...

  5. #5
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Search value in one column and write the corresponding value

    Post new thread button
    Attached Images Attached Images

+ 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