ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF function (https://www.excelbanter.com/excel-worksheet-functions/34339-if-function.html)

AliceNXLand

IF function
 
Please help me, I get a FALSE instead of the True or the "a" I thought I was
supposed to get.

In column C are numbers. In column D is this equation. In column F thru K
are my criteria (cheat sheet). Should I use the numbers that I want the
function to look for? or should I use the addresses (F1:F6, etc.). And do
you see anything wrong with my equation?

=IF(C1="6,11,12,84,86,87,88,89","a")

Ron Coderre

Your original formula is trying to see if C1 is the string
"6,11,12,84,86,87,88,89"

Try this formula:
=IF(ISNUMBER(MATCH(C1,{6,11,12,84,86,87,88,89},0)) ,"a")

Does that help?
--
Regards,
Ron


"AliceNXLand" wrote:

Please help me, I get a FALSE instead of the True or the "a" I thought I was
supposed to get.

In column C are numbers. In column D is this equation. In column F thru K
are my criteria (cheat sheet). Should I use the numbers that I want the
function to look for? or should I use the addresses (F1:F6, etc.). And do
you see anything wrong with my equation?

=IF(C1="6,11,12,84,86,87,88,89","a")


Alok

Another way is

=IF(OR(C1={6,11,12,84,86,87,88,89}),"a","b")

the above has to be array entered.(Ctrl-Shift-Enter)

Alok

"AliceNXLand" wrote:

Please help me, I get a FALSE instead of the True or the "a" I thought I was
supposed to get.

In column C are numbers. In column D is this equation. In column F thru K
are my criteria (cheat sheet). Should I use the numbers that I want the
function to look for? or should I use the addresses (F1:F6, etc.). And do
you see anything wrong with my equation?

=IF(C1="6,11,12,84,86,87,88,89","a")


Sandy Mann

"Alok" wrote in message
...
Another way is

=IF(OR(C1={6,11,12,84,86,87,88,89}),"a","b")

the above has to be array entered.(Ctrl-Shift-Enter)



It works for me without being array entered.

--
Sandy

Replace@mailinator with @tiscali.co.uk

","a")



AliceNXLand

That is perfect, Ron, Thanks!!!!

"Ron Coderre" wrote:

Your original formula is trying to see if C1 is the string
"6,11,12,84,86,87,88,89"

Try this formula:
=IF(ISNUMBER(MATCH(C1,{6,11,12,84,86,87,88,89},0)) ,"a")

Does that help?
--
Regards,
Ron


"AliceNXLand" wrote:

Please help me, I get a FALSE instead of the True or the "a" I thought I was
supposed to get.

In column C are numbers. In column D is this equation. In column F thru K
are my criteria (cheat sheet). Should I use the numbers that I want the
function to look for? or should I use the addresses (F1:F6, etc.). And do
you see anything wrong with my equation?

=IF(C1="6,11,12,84,86,87,88,89","a")


Alok

You are right.
Alok

"Sandy Mann" wrote:

"Alok" wrote in message
...
Another way is

=IF(OR(C1={6,11,12,84,86,87,88,89}),"a","b")

the above has to be array entered.(Ctrl-Shift-Enter)



It works for me without being array entered.

--
Sandy

Replace@mailinator with @tiscali.co.uk

","a")





All times are GMT +1. The time now is 04:46 AM.

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