# Excel - IF Function Problem - Expert Solution

Question description:
This user has given permission to use the problem statement for this blog.

I need to match 2 criterias (2 columns) from 2 excel sheets and if both the value match I want to return value from 3rd column. How can I do that? Please help.
Solved by D. S. in 44 mins
This is the chat thread from the real Excelchat help session. It contains no private user information.
Excelchat Expert 23/05/2018 - 12:23
Hello, hope you are doing well
User 23/05/2018 - 12:23
hey
User 23/05/2018 - 12:23
m good hows you
Excelchat Expert 23/05/2018 - 12:24
So it seems like you would like to match two columns and then return a value if they match. Is that correct?
User 23/05/2018 - 12:24
yes but the vaslues are in different sheets
Excelchat Expert 23/05/2018 - 12:25
Do you have a file with the data?
User 23/05/2018 - 12:25
should i copy the values in excel?
User 23/05/2018 - 12:25
yes
Excelchat Expert 23/05/2018 - 12:25
You can attach the file to this chat
Excelchat Expert 23/05/2018 - 12:25
Can you try doing that?
Excelchat Expert 23/05/2018 - 12:26
Or you can copy the values in the two sheets here
Excelchat Expert 23/05/2018 - 12:26
Whichever is easiest for you
User 23/05/2018 - 12:27
Excelchat Expert 23/05/2018 - 12:28
Hmm I do not see it attached here.
Excelchat Expert 23/05/2018 - 12:28
Maybe attempt to copy paste the values on this sheet
User 23/05/2018 - 12:30
check both sheets
Excelchat Expert 23/05/2018 - 12:30
Ok got it
User 23/05/2018 - 12:30
values in yellow i need to match and value in green i want as a result
Excelchat Expert 23/05/2018 - 12:30
Ok got it, and where would you like the result?
User 23/05/2018 - 12:30
in sheet 1
Excelchat Expert 23/05/2018 - 12:30
Column D of sheet 1
Excelchat Expert 23/05/2018 - 12:30
Got it
User 23/05/2018 - 12:30
yes
Excelchat Expert 23/05/2018 - 12:32
Ok give me one second while I solve
User 23/05/2018 - 12:32
ok
User 23/05/2018 - 12:35
this is just the part of my sheet so you can just send me a formula and i can try that in my worksheet.
Excelchat Expert 23/05/2018 - 12:37
User 23/05/2018 - 12:38
ok
Excelchat Expert 23/05/2018 - 12:41
Ok, so let me explain what I am doing while it is calculating and processing for me
Excelchat Expert 23/05/2018 - 12:42
So the idea is that we will be using an Index Match function
Excelchat Expert 23/05/2018 - 12:42
Where we use a series of match functions by using a multiplication between the criteria. If both criteria are met, then it will return column 1 of the array in sheet 2
User 23/05/2018 - 12:42
yeah i tried the same but am not an expert with that so it reuturned an error
Excelchat Expert 23/05/2018 - 12:44
Ok so this should be the equation you put into D2 of sheet 1:
Excelchat Expert 23/05/2018 - 12:44
=INDEX(Sheet2!A1:H2000,MATCH(1,(Sheet2!H:H=Sheet1!C2)*(Sheet2!C:C=Sheet1!A2),0),1)
Excelchat Expert 23/05/2018 - 12:44
After you paste that in, press:
Excelchat Expert 23/05/2018 - 12:45
Control Shift Enter
Excelchat Expert 23/05/2018 - 12:45
At the same time
User 23/05/2018 - 12:49
i wm not getting
User 23/05/2018 - 12:51
?
Excelchat Expert 23/05/2018 - 12:51
Ok so let me try something else for you
Excelchat Expert 23/05/2018 - 12:54
Hmm, try changing all the data into "Text"
Excelchat Expert 23/05/2018 - 12:54
this may be affecting it
User 23/05/2018 - 12:55
in the sheet?
Excelchat Expert 23/05/2018 - 12:55
Yes
User 23/05/2018 - 12:56
can you show me in the sheet
Excelchat Expert 23/05/2018 - 12:56
Highlight all the data, and then right now it should be as "General"
Excelchat Expert 23/05/2018 - 12:56
Click down on the menu and select "Text"
Excelchat Expert 23/05/2018 - 01:00
Any luck?
Excelchat Expert 23/05/2018 - 01:01
Because there is data missing from this file it may not be viewable on this file and only on yours
Excelchat Expert 23/05/2018 - 01:02
And make sure to use Control + Shift + Enter
Excelchat Expert 23/05/2018 - 01:02
as this is the only way that the data will work
User 23/05/2018 - 01:02
okay thanks i will try

This is the output file from the real Excelchat help session:
This is an example of the expert help you can get. It contains no private user information.

Get instant expert help with Excel and Google Sheets

#### Post your problem and you’ll get expert help in seconds.

Your message must be at least 40 characters
Your privacy is guaranteed. Your session will not be used for blog unless you give us persmission.