Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Or Function
I'm writing a long and complicated formula, so to shorter it up and
"OR" statement would probably help, but I get confused with the syntax. So I'll start at the beginning; how would I combine this formula using or... If(c16="c",b16*d16,if(c16="d",b16*d16)) Thanks |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Or Function
=if(or(c16="c",c16="d"),b16*d16,"what goes here")
or =if(or(c16={"c","d"}),b16*d16,"what goes here") JimS wrote: I'm writing a long and complicated formula, so to shorter it up and "OR" statement would probably help, but I get confused with the syntax. So I'll start at the beginning; how would I combine this formula using or... If(c16="c",b16*d16,if(c16="d",b16*d16)) Thanks -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Or Function
That did the trick, thanks Dave.
On Sat, 07 Mar 2009 07:34:23 -0600, Dave Peterson wrote: =if(or(c16="c",c16="d"),b16*d16,"what goes here") or =if(or(c16={"c","d"}),b16*d16,"what goes here") JimS wrote: I'm writing a long and complicated formula, so to shorter it up and "OR" statement would probably help, but I get confused with the syntax. So I'll start at the beginning; how would I combine this formula using or... If(c16="c",b16*d16,if(c16="d",b16*d16)) Thanks |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Or Function
In the second formula, I take it those "curly brackets" surrounding
{"c","d"} are important? On Sat, 07 Mar 2009 07:34:23 -0600, Dave Peterson wrote: =if(or(c16="c",c16="d"),b16*d16,"what goes here") or =if(or(c16={"c","d"}),b16*d16,"what goes here") JimS wrote: I'm writing a long and complicated formula, so to shorter it up and "OR" statement would probably help, but I get confused with the syntax. So I'll start at the beginning; how would I combine this formula using or... If(c16="c",b16*d16,if(c16="d",b16*d16)) Thanks |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Or Function
Hi Jim
these {"c","d"} is an array and is a shorter way to the first formula on the specified criteria in your example the formula will be evaluating if cell C16 is "c" or "d" and if they are b16*d16 will apply otherwise it will return "what goes here" -- Hope this is helpful Pls click the Yes button below if this post provide answer you have asked Thank You cheers, francis "JimS" wrote: In the second formula, I take it those "curly brackets" surrounding {"c","d"} are important? On Sat, 07 Mar 2009 07:34:23 -0600, Dave Peterson wrote: =if(or(c16="c",c16="d"),b16*d16,"what goes here") or =if(or(c16={"c","d"}),b16*d16,"what goes here") JimS wrote: I'm writing a long and complicated formula, so to shorter it up and "OR" statement would probably help, but I get confused with the syntax. So I'll start at the beginning; how would I combine this formula using or... If(c16="c",b16*d16,if(c16="d",b16*d16)) Thanks |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Or Function
Thanks, that helps. So far so good, but I'm having a problem. Here
is the first part of my formula, which works fine. =IF($B$167,"ERROR",IF($D$167,"ERROR",IF($D$16="" ,$E$16*-50,IF($D$16<$B$16,"ERROR",IF(OR($C$16={"c","d"}),I F($B$16=7,$D$16*20+ 300+1000,IF($B$16=6,$D$16*20+300+500,IF($B$16=5, $D$16*20+300,IF($B$16<5,$D$16*20+50))))))))) To finish it, I'm trying to add the following to this formula; but it always returns false. Both formulas work as a stand alone, but not combined (at least the way I'm doing it.) Obviously I'm doing something wrong. =IF(OR($C$16={"h","s"}),IF($B$16=7,$D$16*30+300+10 00,IF($B$16=6,$D$16*30+300+500,IF($B$16=4,$D$16* 30+300, IF($B$16<4,$D$16*30+50 What is the proper way to combine these two sections? Thanks again. On Sat, 7 Mar 2009 07:16:01 -0800, francis wrote: Hi Jim these {"c","d"} is an array and is a shorter way to the first formula on the specified criteria in your example the formula will be evaluating if cell C16 is "c" or "d" and if they are b16*d16 will apply otherwise it will return "what goes here" |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Or Function
It took a while but I think I got it. It has to do with the number of
parenthesis between the two sections: =IF($B$167,"ERROR",IF($D$167,"ERROR",IF($D$16="" ,$E$16*-50,IF($D$16<$B$16,"ERROR",IF(OR($C$16={"c","d"}), IF($B$16=7,$D$16*20+300+1000,IF($B$16=6,$D$16*20+ 300+500,IF($B$16=5,$D$16*20+300,IF($B$16<5,$D$16* 20+50)))), IF(OR($C$16={"h","s"}),IF($B$16=7,$D$16*30+300+100 0,IF($B$16=6,$D$16*30+300+500,IF($B$16=4,$D$16*3 0+300, IF($B$16<4,$D$16*30+50)))))))))) On Sat, 07 Mar 2009 09:46:07 -0800, JimS wrote: Thanks, that helps. So far so good, but I'm having a problem. Here is the first part of my formula, which works fine. =IF($B$167,"ERROR",IF($D$167,"ERROR",IF($D$16=" ",$E$16*-50,IF($D$16<$B$16,"ERROR",IF(OR($C$16={"c","d"}),I F($B$16=7,$D$16*20+ 300+1000,IF($B$16=6,$D$16*20+300+500,IF($B$16=5 ,$D$16*20+300,IF($B$16<5,$D$16*20+50))))))))) To finish it, I'm trying to add the following to this formula; but it always returns false. Both formulas work as a stand alone, but not combined (at least the way I'm doing it.) Obviously I'm doing something wrong. =IF(OR($C$16={"h","s"}),IF($B$16=7,$D$16*30+300+1 000,IF($B$16=6,$D$16*30+300+500,IF($B$16=4,$D$16 *30+300, IF($B$16<4,$D$16*30+50 What is the proper way to combine these two sections? Thanks again. On Sat, 7 Mar 2009 07:16:01 -0800, francis wrote: Hi Jim these {"c","d"} is an array and is a shorter way to the first formula on the specified criteria in your example the formula will be evaluating if cell C16 is "c" or "d" and if they are b16*d16 will apply otherwise it will return "what goes here" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
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 | |||
Nested IF Function, Date Comparing, and NetworkDays Function | Excel Worksheet Functions |