# How to get the value of X column when 2 other columns values are met

1. ## How to get the value of X column when 2 other columns values are met

Hello!

I have 3 columns with values, Test1, Test2 and Time. I would like to know the value of Time when Test1 = X and Test2 = Y. Attached is my clear example . Thanks!!!

-Luis

2. ## Re: How to get the value of X column when 2 other columns values are met

It's not quite a clear example.... there are 3 Test A's of 0 and Test B's of 2... what if those were the inputs? Do you want first Time or sum of all the Times that match?

If you want sum, then try:

=SUMPRODUCT(--(\$A\$2:\$A\$11=F2),--(\$B\$2:\$B\$11=G2),\$C\$2:\$C\$11)

if you want first match:

=INDEX(\$C\$2:\$C\$11,MATCH(1,INDEX((\$A\$2:\$A\$11=F2)*(\$B\$2:\$B\$11=G2),0),0))

3. ## Re: How to get the value of X column when 2 other columns values are met

Wow, you actually answered my second question without me even asking it :D
I meant the first match. Next time ill try to be more precise with my question.

Thanks a lot!!!
-Luis

#### Thread Information

##### Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### 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