Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 82
Default IF Function

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




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ISBLANK function not working when cell is blank dut to function re mcmilja Excel Discussion (Misc queries) 9 May 7th 23 03:43 AM
copy of excel file not showing formulal/function in the function b oaallam Excel Discussion (Misc queries) 4 September 6th 07 01:20 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM


All times are GMT +1. The time now is 08:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"