#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 175
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default 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
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
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
Nested IF Function, Date Comparing, and NetworkDays Function carl Excel Worksheet Functions 2 December 29th 04 09:57 PM


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

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

About Us

"It's about Microsoft Excel"