A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Extended IF Formula



 
 
Thread Tools Display Modes
  #1  
Old March 24th, 2010, 01:35 PM posted to microsoft.public.excel.newusers
Barny[_4_]
external usenet poster
 
Posts: 1
Default Extended IF Formula


I use this formula to return the value in cell if the criteria is met
but I would like to extend this to say that the value is also returned
if cell J89 = ("C") i.e. either or I89 = W or J89 = C.

=IF(AND(A890,I89="w"),A89,"0")

Hope that makes sense




--
Barny
Ads
  #2  
Old March 24th, 2010, 04:36 PM posted to microsoft.public.excel.newusers
T. Valko
external usenet poster
 
Posts: 15,759
Default Extended IF Formula

If I understand, try this...

=IF(AND(A890,OR(I89="W",J89="C")),A89,0)

It can also be written as:

=AND(A890,OR(I89="W",J89="C"))*A89

--
Biff
Microsoft Excel MVP


"Barny" wrote in message
...

I use this formula to return the value in cell if the criteria is met
but I would like to extend this to say that the value is also returned
if cell J89 = ("C") i.e. either or I89 = W or J89 = C.

=IF(AND(A890,I89="w"),A89,"0")

Hope that makes sense




--
Barny



  #3  
Old March 24th, 2010, 04:46 PM posted to microsoft.public.excel.newusers
Joe User[_2_]
external usenet poster
 
Posts: 757
Default Extended IF Formula

"Barny" wrote:
I would like to extend this to say that the value
is also returned if cell J89 = ("C") i.e. either
or I89 = W or J89 = C.
=IF(AND(A890,I89="w"),A89,"0")


=IF(AND(A890,OR(I89="w",J89="c")), A89, 0)

Note that I wrote zero, not "0". That assumes that A89 is numeric, and you
want to return the number zero, not the text string "0".

PS: My formula above can be shortened to:

=A9*(A890)*(I89="w",J89="c")

If A9 cannot be less than zero, that can be simplified further to:

=A9*OR(I89="w",J89="c")


----- original message -----


"Barny" wrote in message
...

I use this formula to return the value in cell if the criteria is met
but I would like to extend this to say that the value is also returned
if cell J89 = ("C") i.e. either or I89 = W or J89 = C.

=IF(AND(A890,I89="w"),A89,"0")

Hope that makes sense




--
Barny


  #4  
Old March 24th, 2010, 04:51 PM posted to microsoft.public.excel.newusers
RonaldoOneNil
external usenet poster
 
Posts: 345
Default Extended IF Formula

=IF(AND(A890,OR(I89="w",J89="C")),A89,"0")

"Barny" wrote:


I use this formula to return the value in cell if the criteria is met
but I would like to extend this to say that the value is also returned
if cell J89 = ("C") i.e. either or I89 = W or J89 = C.

=IF(AND(A890,I89="w"),A89,"0")

Hope that makes sense




--
Barny
.

  #5  
Old April 1st, 2010, 05:12 PM posted to microsoft.public.excel.newusers
Barny[_5_]
external usenet poster
 
Posts: 1
Default Extended IF Formula


T. Valko;939697 Wrote:
If I understand, try this...

=IF(AND(A890,OR(I89="W",J89="C")),A89,0)

It can also be written as:

=AND(A890,OR(I89="W",J89="C"))*A89

--
Biff
Microsoft Excel MVP


"Barny" wrote in message
...-

I use this formula to return the value in cell if the criteria is

met
but I would like to extend this to say that the value is also

returned
if cell J89 = ("C") i.e. either or I89 = W or J89 = C.

=IF(AND(A890,I89="w"),A89,"0")

Hope that makes sense




--
Barny -


These formulas are fine and do the job, but what I would also now like
to say is:

If I89= W return W in A89 or if J89 =C return C in A89
This is based on I89 / J89 either being blank or containing W or C
There will not be a scenario where I89 and J89 contain w and c at the
same time




--
Barny
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:55 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2004-2018 OfficeFrustration.
The comments are property of their posters.