Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jim C.
 
Posts: n/a
Default How do you insert an "or" operator in an "IF" statement.

Need to create an IF statement where one cell or a second cell or both cells
equal zero and if true it reports one value and if false gives another value.
I tried the following formulas and did not get a numeric value:

=IF(E7=0"or"F7=0,12.95,19.95)
=IF(E7"or"F7=0,12.95,19.95)

Can anyone tell me how to correctly enter the formula?

  #2   Report Post  
Max
 
Posts: n/a
Default

Try: =IF(OR(E7=0,F7=0),12.95,19.95)

--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Jim C." <Jim wrote in message
...
Need to create an IF statement where one cell or a second cell or both

cells
equal zero and if true it reports one value and if false gives another

value.
I tried the following formulas and did not get a numeric value:

=IF(E7=0"or"F7=0,12.95,19.95)
=IF(E7"or"F7=0,12.95,19.95)

Can anyone tell me how to correctly enter the formula?



  #3   Report Post  
Fred Smith
 
Posts: n/a
Default

You use the OR function:

=if(or(e7=0,f7=0),12.95,19.95)

--
Regards,
Fred


"Jim C." <Jim wrote in message
...
Need to create an IF statement where one cell or a second cell or both cells
equal zero and if true it reports one value and if false gives another value.
I tried the following formulas and did not get a numeric value:

=IF(E7=0"or"F7=0,12.95,19.95)
=IF(E7"or"F7=0,12.95,19.95)

Can anyone tell me how to correctly enter the formula?



  #4   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Try this:

=IF(OR(E7=0,F7=0),12.95,19.95)

However, this does not account for empty cells. If one or both cells are
empty the formula will still return 12.65. Is that what you want?

Biff

"Jim C." <Jim wrote in message
...
Need to create an IF statement where one cell or a second cell or both
cells
equal zero and if true it reports one value and if false gives another
value.
I tried the following formulas and did not get a numeric value:

=IF(E7=0"or"F7=0,12.95,19.95)
=IF(E7"or"F7=0,12.95,19.95)

Can anyone tell me how to correctly enter the formula?



  #5   Report Post  
Jim C.
 
Posts: n/a
Default

Your fix worked if both E7 and F7 were 0. I need it to work when only one
or both are 0. When both E7 and E8 = 0 the formula gave the correct
response 12.95.

Thanks for your time. If you have any other suggestion, please forward.

"Max" wrote:

Try: =IF(OR(E7=0,F7=0),12.95,19.95)

--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Jim C." <Jim wrote in message
...
Need to create an IF statement where one cell or a second cell or both

cells
equal zero and if true it reports one value and if false gives another

value.
I tried the following formulas and did not get a numeric value:

=IF(E7=0"or"F7=0,12.95,19.95)
=IF(E7"or"F7=0,12.95,19.95)

Can anyone tell me how to correctly enter the formula?






  #6   Report Post  
Jim C.
 
Posts: n/a
Default

The formula only worked when E7 and F7 = 0 or both were 0. I needed it
also to work when either E7 or F7 0 and the value should be 19.95.

Thanks for your suggestion. If you have any ideas for the 19.95 value to
appear when either E7 or E8 or both are 0 please let me know.

"Fred Smith" wrote:

You use the OR function:

=if(or(e7=0,f7=0),12.95,19.95)

--
Regards,
Fred


"Jim C." <Jim wrote in message
...
Need to create an IF statement where one cell or a second cell or both cells
equal zero and if true it reports one value and if false gives another value.
I tried the following formulas and did not get a numeric value:

=IF(E7=0"or"F7=0,12.95,19.95)
=IF(E7"or"F7=0,12.95,19.95)

Can anyone tell me how to correctly enter the formula?




  #7   Report Post  
Jim C.
 
Posts: n/a
Default


The formula only worked when E7 and F7 = 0 or both were 0. I needed it
also to work when either E7 or F7 0 and the value should be 19.95.

Thanks for your suggestion. If you have any ideas for the 19.95 value to
appear when either E7 or E8 or both are 0 please let me know

"Biff" wrote:

Hi!

Try this:

=IF(OR(E7=0,F7=0),12.95,19.95)

However, this does not account for empty cells. If one or both cells are
empty the formula will still return 12.65. Is that what you want?

Biff

"Jim C." <Jim wrote in message
...
Need to create an IF statement where one cell or a second cell or both
cells
equal zero and if true it reports one value and if false gives another
value.
I tried the following formulas and did not get a numeric value:

=IF(E7=0"or"F7=0,12.95,19.95)
=IF(E7"or"F7=0,12.95,19.95)

Can anyone tell me how to correctly enter the formula?




  #8   Report Post  
Jim C.
 
Posts: n/a
Default

I used your formula but changed the operator from "OR" to "And". It worked.
Why it worked, I am not sure since "OR" seemed to be what logic would expect.

Thanks for heading me in the right direction.

"Max" wrote:

Try: =IF(OR(E7=0,F7=0),12.95,19.95)

--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Jim C." <Jim wrote in message
...
Need to create an IF statement where one cell or a second cell or both

cells
equal zero and if true it reports one value and if false gives another

value.
I tried the following formulas and did not get a numeric value:

=IF(E7=0"or"F7=0,12.95,19.95)
=IF(E7"or"F7=0,12.95,19.95)

Can anyone tell me how to correctly enter the formula?




  #9   Report Post  
Jim C.
 
Posts: n/a
Default

I used your formula but changed the operator from "OR" to "And". It worked.
Why it worked, I am not sure since "OR" seemed to be what logic would expect.

Thanks for heading me in the right direction.


"Fred Smith" wrote:

You use the OR function:

=if(or(e7=0,f7=0),12.95,19.95)

--
Regards,
Fred


"Jim C." <Jim wrote in message
...
Need to create an IF statement where one cell or a second cell or both cells
equal zero and if true it reports one value and if false gives another value.
I tried the following formulas and did not get a numeric value:

=IF(E7=0"or"F7=0,12.95,19.95)
=IF(E7"or"F7=0,12.95,19.95)

Can anyone tell me how to correctly enter the formula?




  #10   Report Post  
Jim C.
 
Posts: n/a
Default

I used your formula but changed the operator from "OR" to "And". It worked.
Why it worked, I am not sure since "OR" seemed to be what logic would expect.

Thanks for heading me in the right direction.


"Biff" wrote:

Hi!

Try this:

=IF(OR(E7=0,F7=0),12.95,19.95)

However, this does not account for empty cells. If one or both cells are
empty the formula will still return 12.65. Is that what you want?

Biff

"Jim C." <Jim wrote in message
...
Need to create an IF statement where one cell or a second cell or both
cells
equal zero and if true it reports one value and if false gives another
value.
I tried the following formulas and did not get a numeric value:

=IF(E7=0"or"F7=0,12.95,19.95)
=IF(E7"or"F7=0,12.95,19.95)

Can anyone tell me how to correctly enter the formula?






  #11   Report Post  
Max
 
Posts: n/a
Default

"Jim C." wrote:
... Thanks for heading me in the right direction. ..


You're welcome !

Glad you were able to tweak the suggested formula to suit,
albeit I must say your orig. post as it stood, points to the use of OR() <g
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--


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
How do I insert a reference to lookup and insert a name Jan K New Users to Excel 3 July 20th 05 10:39 AM
Simultaneouly insert of rows or col. - Ajit Ajit Munj Excel Discussion (Misc queries) 1 March 23rd 05 09:17 AM
insert a JPEG into EXCEL 2002 mckee Excel Discussion (Misc queries) 3 March 11th 05 05:03 PM
insert picture BillGwyer Excel Discussion (Misc queries) 1 March 4th 05 06:37 PM
Challenging Charting C TO Charts and Charting in Excel 0 January 17th 05 06:57 PM


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