+ Reply to Thread
Results 1 to 4 of 4

return value from cell in col C when value in col A = "valueX" AND col B = "valueY"

  1. #1
    Registered User
    Join Date
    02-09-2012
    Location
    Tehran
    MS-Off Ver
    Excel 2010
    Posts
    18

    Lightbulb return value from cell in col C when value in col A = "valueX" AND col B = "valueY"

    Hi, i have a question regarding this specific problem: i have 3 columns filled with string values and i want excel to return the value from the cell in column C when value in column A = "valueX" AND column B = "valueY"

    How can i do this? i guess a Vlookup doesn't work...

    Thanks very much!

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: return value from cell in col C when value in col A = "valueX" AND col B = "valueY"

    hI. tRY.Hi. Try.

    =IF(AND(A1="VALUEX",B1="VALUEy"),C1,""))
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: return value from cell in col C when value in col A = "valueX" AND col B = "valueY"

    If column C are numbers, and you have a unique list you can use SUMIFS

    e.g.

    =SUMIFS(C1:C100,A1:A100,"ValueX",B1:B100,"ValueY")

    if valuex and valuey are numeric, you don't need the quotation marks...

    if column C is text, then try:

    =IFERROR(INDEX(C1:C100,MATCH(1,INDEX((A1:A100="valueX")*(B1:B100="ValueY"),0),0)),"")
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: return value from cell in col C when value in col A = "valueX" AND col B = "valueY"

    Hi,

    You don't say what you want if the condition isn't met, but try:

    =IF(AND(A1="valueX",B1="valueY"),C1,"default value")
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Registered User
    Join Date
    02-09-2012
    Location
    Tehran
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: return value from cell in col C when value in col A = "valueX" AND col B = "valueY"

    Quote Originally Posted by NBVC View Post
    If column C are numbers, and you have a unique list you can use SUMIFS

    e.g.

    =SUMIFS(C1:C100,A1:A100,"ValueX",B1:B100,"ValueY")

    if valuex and valuey are numeric, you don't need the quotation marks...

    if column C is text, then try:

    =IFERROR(INDEX(C1:C100,MATCH(1,INDEX((A1:A100="valueX")*(B1:B100="ValueY"),0),0)),"")
    Thanks a lot! This worked like a charm! I had to change it a bit though, now it looks like this: IF(ISERROR(INDEX($C$1:$C$100, MATCH(1, INDEX(($A$1:$A$100=$Z$1)*($B$1:$B$100=$Z$2), 0, 0), 0), 0))

  6. #6
    Registered User
    Join Date
    02-09-2012
    Location
    Tehran
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: return value from cell in col C when value in col A = "valueX" AND col B = "valueY"

    and also thanks for the other replies of course!
    Last edited by amirah_almu7aka; 08-16-2012 at 03:19 AM.

+ 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