If column X equals A and column Y equals B then show what's in column Z

HEzim

New Member
Joined
Mar 4, 2021
Messages
18
Office Version
  1. 365
  2. 2013
  3. 2011
Platform
  1. Windows
Hi everyone,

Stuck on creating a formula in excel.
Column x,y and z are next to each other. I need a formula that functions like this:
if column x equals "a", and if column y equals "b" then pull/show what's in column z

I tried using If functions but I can't seem to get them to apply to entire columns.

Please help.
 
Do you think you could tell me the other way you had in mind?
If they don't match with that formula, then wouldn't match with other formulas (assuming you don't have an error in your formula).
So you most likely have either:
1. An error in your formula.
2. A data issue.

Can you just post your formula and a screen print of your data?
Exactly what kind of data is in column X and Y?

Note that when matching, they must match EXACTLY. The following things will cause them NOT to match:
1. Any extra spaces (or other characters) at the beginning or ending of your value.
2. Comparing numbers to text fields. The data you compare MUST be the same data type (i.e. numbers-to-numbers and strings-to-strings).

People often run into trouble with the second one, when they have numbers entered as text and try to compare them to numbers.
 
Upvote 0

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
If they don't match with that formula, then wouldn't match with other formulas (assuming you don't have an error in your formula).
So you most likely have either:
1. An error in your formula.
2. A data issue.

Can you just post your formula and a screen print of your data?
Exactly what kind of data is in column X and Y?

Note that when matching, they must match EXACTLY. The following things will cause them NOT to match:
1. Any extra spaces (or other characters) at the beginning or ending of your value.
2. Comparing numbers to text fields. The data you compare MUST be the same data type (i.e. numbers-to-numbers and strings-to-strings).

People often run into trouble with the second one, when they have numbers entered as text and try to compare them to numbers.
Hey I have actually been bale to fix it, thanks to your help.

I had to use the concantenate ("&") vlookup method you suggested. However, in the example, he does not input "FALSE" in his formula. And for whatever reason NOT inputting "FALSE" in the formula made it not work.

Thanks again.
 
Upvote 0
If you put in FALSE or 0, it will only return EXACT matches.
If you put in TRUE or 1, it will return APPOXIMATE matches (which means if it does not find a match, it will return the closest one).
So you need to be careful and make sure it is always returning what you want.
See here for an explanation: How to use the Excel VLOOKUP function | Exceljet

If you had posted an image of your data, we might be able to have a better idea of what is going on. Without seeing what kind of data you are actually working with, it is just a guessing game.

By the way, with the first formula I posted, you did remember to enter it using CTRL+SHIFT+ENTER, and not just ENTER, right?
It won't work right if you don't.
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top