Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ron
 
Posts: n/a
Default using OR with IF function?

Hello,

I have a cell (cell1) with this formula

=IF((K11)="","",SUM((K11)/(AB12))*1000)

Then I have another cell (cell2) which derives its value
from cell1 (and another cell)

=IF((K14)0, IF((K11)<"",SUM(K14+K11),""),"")

If the value in cell1 = 0 then I want to modify the
formula for cell2 (pseudocode here) to look something like
this:

=IF((K14)0, IF((K11)<"" OR ((K11) 0),SUM
(K14+K11),""),"")

Obviously, this formula doesn't work. Is there a way to
write a formula with an OR clause along with the IF
statement?

Thanks,
Ron

  #2   Report Post  
JulieD
 
Posts: n/a
Default

Hi Ron

(bit confusing with all of the brackets and extraneous "SUMs")

- formula 1 in cell 1
=IF(K11="","",(K11/AB12)*1000)

- formula 2 in cell 2
=IF(K140,IF(K11<"",K14+K11,""),"")

now you want
=IF(K140,IF(OR(K11<"",K110),K14+K11,""),"")

Hope this helps
Cheers
JulieD


"Ron" wrote in message
...
Hello,

I have a cell (cell1) with this formula

=IF((K11)="","",SUM((K11)/(AB12))*1000)

Then I have another cell (cell2) which derives its value
from cell1 (and another cell)

=IF((K14)0, IF((K11)<"",SUM(K14+K11),""),"")

If the value in cell1 = 0 then I want to modify the
formula for cell2 (pseudocode here) to look something like
this:

=IF((K14)0, IF((K11)<"" OR ((K11) 0),SUM
(K14+K11),""),"")

Obviously, this formula doesn't work. Is there a way to
write a formula with an OR clause along with the IF
statement?

Thanks,
Ron



  #3   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
first you could simplify your existing formulas a little bit :-)
=IF((K11)="","",SUM((K11)/(AB12))*1000)
becomes
=IF(K11="","",K11/(AB12*1000))

and
=IF((K14)0, IF((K11)<"",SUM(K14+K11),""),"")
becomes
=IF(K140,IF(K11<"",K14+K11,""),"")

for your formula request try:
=IF(K140,IF(OR(K11<"",K110),K14+K11,""),"")


--
Regards
Frank Kabel
Frankfurt, Germany
"Ron" schrieb im Newsbeitrag
...
Hello,

I have a cell (cell1) with this formula

=IF((K11)="","",SUM((K11)/(AB12))*1000)

Then I have another cell (cell2) which derives its value
from cell1 (and another cell)

=IF((K14)0, IF((K11)<"",SUM(K14+K11),""),"")

If the value in cell1 = 0 then I want to modify the
formula for cell2 (pseudocode here) to look something like
this:

=IF((K14)0, IF((K11)<"" OR ((K11) 0),SUM
(K14+K11),""),"")

Obviously, this formula doesn't work. Is there a way to
write a formula with an OR clause along with the IF
statement?

Thanks,
Ron



  #4   Report Post  
JE McGimpsey
 
Posts: n/a
Default

First, in your original formulae, SUM() is superfluous:

=IF(K11="","",K11/AB12*1000)
=IF(K140,IF(K11<"",K14+K11,""),"")

are equivalent.

To use OR:

=IF(K140,IF(OR(K11<"",K110),K14+K11,""),"")

However, that's relatively meaningless since if K110, it is by
definition not a null string. Since a null string will be interpreted as
0 in a comparison involving numbers, you can simply use

=IF(K140,IF(K110,K14+K11,""),"")

or, more efficiently

=IF(AND(K140,K110),K14+K11,"")



In article ,
"Ron" wrote:

Hello,

I have a cell (cell1) with this formula

=IF((K11)="","",SUM((K11)/(AB12))*1000)

Then I have another cell (cell2) which derives its value
from cell1 (and another cell)

=IF((K14)0, IF((K11)<"",SUM(K14+K11),""),"")

If the value in cell1 = 0 then I want to modify the
formula for cell2 (pseudocode here) to look something like
this:

=IF((K14)0, IF((K11)<"" OR ((K11) 0),SUM
(K14+K11),""),"")

Obviously, this formula doesn't work. Is there a way to
write a formula with an OR clause along with the IF
statement?

Thanks,
Ron

  #5   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Note that the porposed substitute is a million times too small <g.
Perhaps

=IF(K11="","",K11/AB12*1000)

In article ,
"Frank Kabel" wrote:

first you could simplify your existing formulas a little bit :-)
=IF((K11)="","",SUM((K11)/(AB12))*1000)
becomes
=IF(K11="","",K11/(AB12*1000))



  #6   Report Post  
Ron
 
Posts: n/a
Default

Thanks all for your help. I was actually wondering about
the superfluous Sum, I think I inherited these formulas
(not to pass the buck), but now I will fix these as you
folks have suggested. Thanks also for the demos on using
Or, and And, I was also going to ask about And.

Ron

-----Original Message-----
Hello,

I have a cell (cell1) with this formula

=IF((K11)="","",SUM((K11)/(AB12))*1000)

Then I have another cell (cell2) which derives its value
from cell1 (and another cell)

=IF((K14)0, IF((K11)<"",SUM(K14+K11),""),"")

If the value in cell1 = 0 then I want to modify the
formula for cell2 (pseudocode here) to look something

like
this:

=IF((K14)0, IF((K11)<"" OR ((K11) 0),SUM
(K14+K11),""),"")

Obviously, this formula doesn't work. Is there a way to
write a formula with an OR clause along with the IF
statement?

Thanks,
Ron

.

  #7   Report Post  
Frank Kabel
 
Posts: n/a
Default

:-)
thanks J.E
missed that bracket

--
Regards
Frank Kabel
Frankfurt, Germany
"JE McGimpsey" schrieb im Newsbeitrag
...
Note that the porposed substitute is a million times too small <g.
Perhaps

=IF(K11="","",K11/AB12*1000)

In article ,
"Frank Kabel" wrote:

first you could simplify your existing formulas a little bit :-)
=IF((K11)="","",SUM((K11)/(AB12))*1000)
becomes
=IF(K11="","",K11/(AB12*1000))



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
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM
I cant use englisch function names in a swedich version of excel PE Excel Discussion (Misc queries) 2 December 7th 04 01:00 AM
Find a Function to use accross different worksheets R. Hale Excel Worksheet Functions 3 November 25th 04 07:07 AM
change function variable prompts?? thinkingfield Excel Worksheet Functions 1 November 8th 04 04:01 PM
Counting Function Dilemma Simon Lloyd Excel Worksheet Functions 0 November 8th 04 03:13 PM


All times are GMT +1. The time now is 05:26 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"