Still stumped
There seems to be many mistakes in your posting. Please use copy-and-paste
in the future. Also, please do not create a new thread unless this is truly
a different problem. Your comment suggests this thread is related to
another thread. Yet these IF() functions are very different from a previous
thread that I see you posted.
"LarryK" wrote:
Here's how the formulas will read when finished (I hope)
=IF(AND(B16=10,B18=8),"73.16","68.76")
I think you mean: IF(AND(B16=10,B18=8),73.16,68.76) -- no quotes are the
numbers.
this is the result of this formula
if cell B16=10 and B18=8 cell B20 shows $73.16
if cell B16 and B18 have different amounts cell B20 shows $68.76
which is perfect, and works fine
Do you mean if __either__ (or both) B16 or B18 has different amounts? That
is what the logic of your IF() expression says.
Problems start when I try to add
=IF(AND(B16=11,B-18=8),"80.20","75.36") to the above formula
buy adding this the result should be
if cell B16=11 and B18=8 Cell B20 shows $80.20
if cell B16 and B18 have [??different??] amounts cell B20 shows $75.36
Well, you have 4 outcomes, but only 2 test conditions. There is no way to
string those together. If B16 is neither 10 nor 11, or if B18 is not 8,
what do you want the result to be? According to the statements above, you
want the result to be 68.76 __and__ 75.36 :-). In other words, your
requirements are ambiguous.
Perhaps this is what you want:
=if(B16=10,if(B18=8,73.16,68.76),if(B16=11,if(B18= 8,80.20,75.36),"none of
the above"))
The "none of the above" result covers the case where B16 is neither 10 nor
11. Your logic above offers no hint of how to disambiguate that case.
PS: If you have a lot more states for B16 than just 10 or 11, it would
behoove you to seek a completely different form of solution altogether. But
in that case, you will need to tell us all the values or the range of values
in B16 that you are concerned about, and what you want the result to be if
B16 is none of those values.
------ original message -----
"LarryK" wrote in message
...
The results from the suggestions I recieved didn't help. That's probably
my
fault, I'm a little frustrated. Here's how the formulas will read when
finished (I hope)
=IF(AND(B16=10,B18=8),"73.16","68.76")
this is the result of this formula
if cell B16=10 and B18=8 cell B20 shows $73.16 if cell B16 and B18
have
different amounts cell B20 shows $68.76 which is perfect, and works fine
Problems start when I try to add
=IF(AND(B16=11,B-18=8),"80.20","75.36") to the above formula
buy adding this the result should be
if cell B16=11 and B18=8 Cell B20 shows $80.20 if cell B16 and B18 have
amounts cell B20 shows $75.36 The formulas work fine apart, I need them
to
work together.
I can string this formula together without problem
=IF(B16=10,"73.16","68.67",IF(B16=11,"80.20",75.36 "))
it has to be a simple solution, but darn if I can figure it.
Many thanks for the real fast response, sorry they didn't work.
Larry
|