Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have a formula using the IF function and am having trouble making it work.
The formula: Cell Q22 =IF(E22=3,IF(O223,"NC", "C"),IF(O22<3,"C", "NC")) Cell R22 =IF(E22=10,IF(O2210,"NC", "C"),IF(O22<10,"C", "NC")) What I'm trying to do is show either "C" or "NC" in cell Q22 (for number 3 selected in cell E22) or R22 (for number 10 selected in cell E22). If cell Q22 displays "C" or "NC", I want cell R22 to remain blank; If cell R22 displays "C" or "NC", I want cell Q22 to remain blank. I hope this makes sense, I tried to and an OR function but it said I had too many variables for this function. can someone help me with this? Thanks, Mike |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
I think what you want is: =IF(E22=3,IF(O223,"NC", "C")) and =IF(E22=10,IF(O2210,"NC", "C")) The question is what do you want to display if E22 does not equal 3 or 10? -- If this helps, please click the Yes button. Cheers, Shane Devenshire "watermt" wrote: I have a formula using the IF function and am having trouble making it work. The formula: Cell Q22 =IF(E22=3,IF(O223,"NC", "C"),IF(O22<3,"C", "NC")) Cell R22 =IF(E22=10,IF(O2210,"NC", "C"),IF(O22<10,"C", "NC")) What I'm trying to do is show either "C" or "NC" in cell Q22 (for number 3 selected in cell E22) or R22 (for number 10 selected in cell E22). If cell Q22 displays "C" or "NC", I want cell R22 to remain blank; If cell R22 displays "C" or "NC", I want cell Q22 to remain blank. I hope this makes sense, I tried to and an OR function but it said I had too many variables for this function. can someone help me with this? Thanks, Mike |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
"watermt" wrote:
What I'm trying to do is show either "C" or "NC" in cell Q22 (for number 3 selected in cell E22) or R22 (for number 10 selected in cell E22). That sounds fine. So you want logic that looks like this: Q22: =if(E22=3, something, "") R22: =if(E22=10, something, "") If cell Q22 displays "C" or "NC", I want cell R22 to remain blank; If cell R22 displays "C" or "NC", I want cell Q22 to remain blank. The above paradigm will ensure that. However, there is also a case when __both__ Q22 and R22 are blank, namely when E22 is __neither__ 3 nor 10. Is that okay? If this is on the right track, the question is: what is "something" in the Q22 and R22 formulas? Unfortunately, your intent is unclear from your IF() expressions. Perhaps the following will suffice: Q22: =if(E22=3, if(O223,"NC","C"), "") R22: =if(E22=10, if(O2210,"NC","C"), "") This is different from your IF() expressions. You should test with E22 not 3 or 10 __and__ O22 <3, =3 and 3 to be sure you are getting the desired result. If it is not the desired result in some cases, please post an update to this thread with all the cases filled in the following matrix for each of (separately) Q22 and R22: E22 O22<3 O22=3 O223 ---- 3 10 not 3 or 10 HTH. ----- original posting ----- "watermt" wrote: I have a formula using the IF function and am having trouble making it work. The formula: Cell Q22 =IF(E22=3,IF(O223,"NC", "C"),IF(O22<3,"C", "NC")) Cell R22 =IF(E22=10,IF(O2210,"NC", "C"),IF(O22<10,"C", "NC")) What I'm trying to do is show either "C" or "NC" in cell Q22 (for number 3 selected in cell E22) or R22 (for number 10 selected in cell E22). If cell Q22 displays "C" or "NC", I want cell R22 to remain blank; If cell R22 displays "C" or "NC", I want cell Q22 to remain blank. I hope this makes sense, I tried to and an OR function but it said I had too many variables for this function. can someone help me with this? Thanks, Mike |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks JoeU2004! Your formula worked:
Q22: =if(E22=3, if(O223,"NC","C"), "") R22: =if(E22=10, if(O2210,"NC","C"), "") If cellE22 is blank then both Q22 and R22 should also be blank. And if the selection is 3 in cell E22 only the _if(O223,"NC","C"), "")_ applies and vice-versa if cell E22 is 10. Sorry for not expressing that very well in the beginning of this discussion! Thanks, Mike "JoeU2004" wrote: "watermt" wrote: What I'm trying to do is show either "C" or "NC" in cell Q22 (for number 3 selected in cell E22) or R22 (for number 10 selected in cell E22). That sounds fine. So you want logic that looks like this: Q22: =if(E22=3, something, "") R22: =if(E22=10, something, "") If cell Q22 displays "C" or "NC", I want cell R22 to remain blank; If cell R22 displays "C" or "NC", I want cell Q22 to remain blank. The above paradigm will ensure that. However, there is also a case when __both__ Q22 and R22 are blank, namely when E22 is __neither__ 3 nor 10. Is that okay? If this is on the right track, the question is: what is "something" in the Q22 and R22 formulas? Unfortunately, your intent is unclear from your IF() expressions. Perhaps the following will suffice: Q22: =if(E22=3, if(O223,"NC","C"), "") R22: =if(E22=10, if(O2210,"NC","C"), "") This is different from your IF() expressions. You should test with E22 not 3 or 10 __and__ O22 <3, =3 and 3 to be sure you are getting the desired result. If it is not the desired result in some cases, please post an update to this thread with all the cases filled in the following matrix for each of (separately) Q22 and R22: E22 O22<3 O22=3 O223 ---- 3 10 not 3 or 10 HTH. ----- original posting ----- "watermt" wrote: I have a formula using the IF function and am having trouble making it work. The formula: Cell Q22 =IF(E22=3,IF(O223,"NC", "C"),IF(O22<3,"C", "NC")) Cell R22 =IF(E22=10,IF(O2210,"NC", "C"),IF(O22<10,"C", "NC")) What I'm trying to do is show either "C" or "NC" in cell Q22 (for number 3 selected in cell E22) or R22 (for number 10 selected in cell E22). If cell Q22 displays "C" or "NC", I want cell R22 to remain blank; If cell R22 displays "C" or "NC", I want cell Q22 to remain blank. I hope this makes sense, I tried to and an OR function but it said I had too many variables for this function. can someone help me with this? Thanks, Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ISBLANK function not working when cell is blank dut to function re | Excel Discussion (Misc queries) | |||
copy of excel file not showing formulal/function in the function b | Excel Discussion (Misc queries) | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Offset function with nested match function not finding host ss. | Excel Worksheet Functions | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions |