One Cell References Multiple Cells - When False, Checks another set

TVProducer

New Member
Joined
Dec 29, 2017
Messages
3
Hello All,

So i have spent an hour researching this but it seems as though i cannot get the formula right.

My task is to take a reference cell (user input cell) and compare it with an array of data, when it matches something, it returns a value, else, it checks another array. see below example
USER INPUT CELL
"B757"
"E120"
"B737"

<tbody>
</tbody>
"B190"
"A320"

<tbody>
</tbody>
"C650"

<tbody>
</tbody>

so if someone enters into the user input cell B757 i want it to check the first array of values (2nd column), if it finds it return "Category D Aircraft", if not, it will check the next array, then return "Category E Aircraft", else "No Match."

The Formula i was using is IF(ISNA(MATCH(A1,B1:B3,0)),"CATEGORY D AIRCRAFT",IF(ISNA(MATCH(A1,C1:C3,0)),"CATEGORY E AIRCRAFT", "NO MATCH"))

Another thing that bugged me is that i have to put all values in quotes because they are strings. I want the user to not have to put anything in quotations when they put in an aircraft model.

Thanks for the help!
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Perhaps.

=IF(ISNUMBER(MATCH(A1,B1:B3,0)),"CATEGORY D AIRCRAFT",IF(ISNUMBER(MATCH(A1,C1:C3,0)),"CATEGORY E AIRCRAFT", "NO MATCH"))

As for the quotes, why have you entered the values in B1:C3 in quotes in the first place?

You don't need to enter strings in quotes, you can just enter them directly in the cells.
 
Upvote 0
Perhaps.

=IF(ISNUMBER(MATCH(A1,B1:B3,0)),"CATEGORY D AIRCRAFT",IF(ISNUMBER(MATCH(A1,C1:C3,0)),"CATEGORY E AIRCRAFT", "NO MATCH"))

As for the quotes, why have you entered the values in B1:C3 in quotes in the first place?

You don't need to enter strings in quotes, you can just enter them directly in the cells.

I added quotes because whenever i put in a value into user input, it wouldn't match. If i added quotations marks it would.
 
Upvote 0
I tried with your example data, without any quotes, and the formula I posted worked.
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,868
Members
449,053
Latest member
Mesh

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