ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Not sure what type of formula to use (https://www.excelbanter.com/excel-worksheet-functions/256458-not-sure-what-type-formula-use.html)

woodson87

Not sure what type of formula to use
 
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.

Beverly

Not sure what type of formula to use
 
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

"woodson87" wrote:

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.


T. Valko

Not sure what type of formula to use
 
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")

--
Biff
Microsoft Excel MVP


"woodson87" wrote in message
...
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.





All times are GMT +1. The time now is 08:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com