#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default IF and OR formulas

I'm having trouble with my formulas. I'm trying to get excel to autopopulate
certain cells with information using IF statements however I also need to
imbed OR statements otherwise the information isn't autopopulated correctly.
For example:
If A2=L and A3=L then A1 goes into cell B5 OR if B2=L and B3=L then B1 goes
into cell B5.
So what I need is a statement that'll allow me to use IF, AND and OR
statements all at the same time.
Can anyone give me a forumla that'll work? Can excel even do this?
Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default IF and OR formulas

Put this formula in B5:

=IF(AND(A2="L",A3="L"),A1,IF(AND(B2="L",B3="L"),B1 ,"neither"))

You didn't specify what should happen if neither conditions are true,
so this returns the word neither - you could change it to "" if you
want a blank result.

Hope this helps.

Pete

On Jun 25, 7:58 pm, ExcelBeginner
wrote:
I'm having trouble with my formulas. I'm trying to get excel to autopopulate
certain cells with information using IF statements however I also need to
imbed OR statements otherwise the information isn't autopopulated correctly.
For example:
If A2=L and A3=L then A1 goes into cell B5 OR if B2=L and B3=L then B1 goes
into cell B5.
So what I need is a statement that'll allow me to use IF, AND and OR
statements all at the same time.
Can anyone give me a forumla that'll work? Can excel even do this?
Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default IF and OR formulas

hi
in B5.....

=IF(AND(A2="L",A3="L"),A1,IF(AND(B2="L",B3="L"),B1 ,0))

Regards
FSt1

"ExcelBeginner" wrote:

I'm having trouble with my formulas. I'm trying to get excel to autopopulate
certain cells with information using IF statements however I also need to
imbed OR statements otherwise the information isn't autopopulated correctly.
For example:
If A2=L and A3=L then A1 goes into cell B5 OR if B2=L and B3=L then B1 goes
into cell B5.
So what I need is a statement that'll allow me to use IF, AND and OR
statements all at the same time.
Can anyone give me a forumla that'll work? Can excel even do this?
Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.misc
bj bj is offline
external usenet poster
 
Posts: 1,397
Default IF and OR formulas

there is a priority issue here
if A2:B3 all equal L, then does A1 or B1 be entered in B5?
what do you want in B5 otherwise
If there is no chance of A2:B3 all being L
then
in B5
=if(and(A2="L",A3="L"),A1,if(and(B2="L",B3="L"),B1 ,"Otherwise"))


"ExcelBeginner" wrote:

I'm having trouble with my formulas. I'm trying to get excel to autopopulate
certain cells with information using IF statements however I also need to
imbed OR statements otherwise the information isn't autopopulated correctly.
For example:
If A2=L and A3=L then A1 goes into cell B5 OR if B2=L and B3=L then B1 goes
into cell B5.
So what I need is a statement that'll allow me to use IF, AND and OR
statements all at the same time.
Can anyone give me a forumla that'll work? Can excel even do this?
Thanks.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default IF and OR formulas

=IF(AND(A2="L",A3="L"),A1,IF(AND(B2="L",B3="L"),B1 ,"otherwise"))



What happens if neither condition is true .."otherwise"?


"ExcelBeginner" wrote:

I'm having trouble with my formulas. I'm trying to get excel to autopopulate
certain cells with information using IF statements however I also need to
imbed OR statements otherwise the information isn't autopopulated correctly.
For example:
If A2=L and A3=L then A1 goes into cell B5 OR if B2=L and B3=L then B1 goes
into cell B5.
So what I need is a statement that'll allow me to use IF, AND and OR
statements all at the same time.
Can anyone give me a forumla that'll work? Can excel even do this?
Thanks.

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
CELLS NOT CALC FORMULAS - VALUES STAY SME FORMULAS CORRECT?? HELP Sherberg Excel Worksheet Functions 4 September 11th 07 01:34 AM
automatically copy formulas down columns or copy formulas all the HowlingBlue Excel Worksheet Functions 1 March 16th 07 11:11 PM
Formulas not evaluated, Formulas treated as strings Bob Sullentrup Excel Discussion (Misc queries) 0 November 27th 06 08:01 PM
Formulas go away PE Excel Worksheet Functions 4 June 7th 06 04:06 PM
formulas for changing formulas? creativeops Excel Discussion (Misc queries) 4 January 26th 06 03:07 AM


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

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"