Not sure what type of formula to use

W

woodson87

I'm trying to find in one of my rows of my excel spreadsheet specific
countries like Germany, Italy, France, etc. I need a formula that will
display IF one of those names occurs in that row, it will display a Y for
Yes. If it is not one of those names, I want it to display a N for No.
 
B

Beverly

You can use "countif" for this. Here's how it would work:

Row 1 = your data range
Column A = the values you want to find

Here's some sample data:
Row 1 Column A (starting in row 2)
Germany Germany
Italy USA
Austria
France
Hungary

In cell B2, next to Germany, your formula would be:
=if(countif($1:$1,a2)=0,"No","Yes")

Beverly
 
T

T. Valko

I'm assuming you mean that if the range contains Germany *OR* Italy *OR*
France then return Y.

Try this...

=IF(SUM(COUNTIF(A1:J1,{"Germany","Italy","France"})),"Y","N")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top