ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   What am I doing wrong? (https://www.excelbanter.com/excel-discussion-misc-queries/16285-what-am-i-doing-wrong.html)

Jeff

What am I doing wrong?
 
Here is the formula I came up with but it doesn't do what I want it to.

=IF(C247.999,IF(D2143.999,"22222",IF(C2<47.998,I F(D2<143.998,"33333"))))

If I type 48 or higher in C2 and 144 or higher in D2 it returns "22222"
(this is what i want), but when I type anything lower in either column it
returns "FALSE". I want it to return "33333".

In other words, I want it to return "22222" only when both C2 and D2 are
true, but when either one of them are not true, I want "33333" returned.

Thank you,
Jeff


Dave Peterson

Maybe...

=if(and(c247.999,d2143.999),22222,33333)

I removed the double quotes. I guessed that you really wanted to return a
number--not a string.

Jeff wrote:

Here is the formula I came up with but it doesn't do what I want it to.

=IF(C247.999,IF(D2143.999,"22222",IF(C2<47.998,I F(D2<143.998,"33333"))))

If I type 48 or higher in C2 and 144 or higher in D2 it returns "22222"
(this is what i want), but when I type anything lower in either column it
returns "FALSE". I want it to return "33333".

In other words, I want it to return "22222" only when both C2 and D2 are
true, but when either one of them are not true, I want "33333" returned.

Thank you,
Jeff


--

Dave Peterson

[email protected]

Jeff wrote:
Here is the formula I came up with but it doesn't do what I want it

to.

=IF(C247.999,IF(D2143.999,"22222",IF(C2<47.998,I F(D2<143.998,"33333"))))
[....]
I want it to return "22222" only when both C2 and D2 are
true, but when either one of them are not true, I want "33333"
returned.


=IF(AND(C2 = 48, D2 = 144), "22222", "33333")

By the way, are you sure want __text__ "22222" and "33333"?
Or do you want __numbers___ 22222 and 33333 (without quotes)?


Jeff

Thanks ,
This works and yes I want text since it eliminates .000 (I know you can
acheive the same with numbers.)

I have one more question for you: Everthing works great except I want an
empty box (nothing returned) when either C2 or D2 are empty.

Thanks again,
Jeff

" wrote:

Jeff wrote:
Here is the formula I came up with but it doesn't do what I want it

to.

=IF(C247.999,IF(D2143.999,"22222",IF(C2<47.998,I F(D2<143.998,"33333"))))
[....]
I want it to return "22222" only when both C2 and D2 are
true, but when either one of them are not true, I want "33333"
returned.


=IF(AND(C2 = 48, D2 = 144), "22222", "33333")

By the way, are you sure want __text__ "22222" and "33333"?
Or do you want __numbers___ 22222 and 33333 (without quotes)?



Bill Kuunders


=IF(AND(C2=48,D2=144),"22222",IF(OR(C2="",D2="") ,"","33333"))

Regards
Bill K

"Jeff" wrote in message
...
Thanks ,
This works and yes I want text since it eliminates .000 (I know you can
acheive the same with numbers.)

I have one more question for you: Everthing works great except I want an
empty box (nothing returned) when either C2 or D2 are empty.

Thanks again,
Jeff

" wrote:

Jeff wrote:
Here is the formula I came up with but it doesn't do what I want it

to.

=IF(C247.999,IF(D2143.999,"22222",IF(C2<47.998,I F(D2<143.998,"33333"))))
[....]
I want it to return "22222" only when both C2 and D2 are
true, but when either one of them are not true, I want "33333"
returned.


=IF(AND(C2 = 48, D2 = 144), "22222", "33333")

By the way, are you sure want __text__ "22222" and "33333"?
Or do you want __numbers___ 22222 and 33333 (without quotes)?





Jeff

Thanks Bill,
It works perfectly! I'll be using this formula for a lot of things.
I really appreciate yours and everybody's help.
Jeff

"Bill Kuunders" wrote:


=IF(AND(C2=48,D2=144),"22222",IF(OR(C2="",D2="") ,"","33333"))

Regards
Bill K

"Jeff" wrote in message
...
Thanks ,
This works and yes I want text since it eliminates .000 (I know you can
acheive the same with numbers.)

I have one more question for you: Everthing works great except I want an
empty box (nothing returned) when either C2 or D2 are empty.

Thanks again,
Jeff

" wrote:

Jeff wrote:
Here is the formula I came up with but it doesn't do what I want it
to.

=IF(C247.999,IF(D2143.999,"22222",IF(C2<47.998,I F(D2<143.998,"33333"))))
[....]
I want it to return "22222" only when both C2 and D2 are
true, but when either one of them are not true, I want "33333"
returned.

=IF(AND(C2 = 48, D2 = 144), "22222", "33333")

By the way, are you sure want __text__ "22222" and "33333"?
Or do you want __numbers___ 22222 and 33333 (without quotes)?






Jeff



"Bill Kuunders" wrote:


=IF(AND(C2=48,D2=144),"22222",IF(OR(C2="",D2="") ,"","33333"))

Regards
Bill K

"Jeff" wrote in message
...
Thanks ,
This works and yes I want text since it eliminates .000 (I know you can
acheive the same with numbers.)

I have one more question for you: Everthing works great except I want an
empty box (nothing returned) when either C2 or D2 are empty.

Thanks again,
Jeff

" wrote:

Jeff wrote:
Here is the formula I came up with but it doesn't do what I want it
to.

=IF(C247.999,IF(D2143.999,"22222",IF(C2<47.998,I F(D2<143.998,"33333"))))
[....]
I want it to return "22222" only when both C2 and D2 are
true, but when either one of them are not true, I want "33333"
returned.

=IF(AND(C2 = 48, D2 = 144), "22222", "33333")

By the way, are you sure want __text__ "22222" and "33333"?
Or do you want __numbers___ 22222 and 33333 (without quotes)?







All times are GMT +1. The time now is 02:54 PM.

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