function" if"

  • Thread starter Thread starter afdmello
  • Start date Start date
A

afdmello

Can I enter multiple truths in the logical field.


For eg:

If A3 is equal to G1 or G2 or G3 ( if true) then A1 equal to H1, if false
I want to use the "if " function again to loop as A3 is equal to G4 or G5 or
G6 (if true) then A1 is equal to H2, if false then blank.

I want this type of logic to extend from A1 to A5( so that if the cell A3
changes from G1 to G6 ( or function) then A1 to A5 changes to H1 to H4( or
function) automatically).

Afd
 
Here is one way to test if a cell equals any of several other cells:

=IF((A3=G1)+(A3=G2)+(A3=G3),"value if true","value if false")
another way is to use the OR() function.
 
Use OR functions or AND functions and read a good book on Excel by John
Walkenbach at http://www.j-walk.com/ss
I usually find it helps to acquire knowledge about something by reading a
book before I use that something.

Good luck.


Tyro
 
I usually find it helps to acquire knowledge about something by reading a
book before I use that something.

Did that apply when you were learning to swim, or to drive a car?
There are many things you can DO without having to read about it
first, though you keep expecting posters to buy books.

Pete
 
If A3 is equal to  G1 or G2 or G3 ( if true) then  A1 equal to H1, if false
I want to use the "if " function again to loop as A3 is equal to G4 or G5
or G6 (if true) then A1 is equal to H2, if false then blank.

One way (formula in A1):

=if(or(A3=G1,A3=G2,A3=G3), H1,
if(or(A3=G4,A3=G5,A3=G6), H2, "")

Note: "" is not exactly "blank", if by "blank" you mean empty. That
is, ISBLANK(A1) will be false, but A1="" will be true.

I want this type of logic to extend from A1 to A5( so that if the cell A3
changes from G1 to G6 ( or function) then A1 to A5 changes to H1 to H4( or
function)   automatically).

This requirement does not make sense to me. The above formulation
might not meet this requirement.
 
Thanks

I tried out the OR function with the if , and it came out just fine. I was
trying but somehow it was not working. I used absolute references and the
formula applied to other cells too.


If A3 is equal to G1 or G2 or G3 ( if true) then A1 equal to H1, if false
I want to use the "if " function again to loop as A3 is equal to G4 or G5
or G6 (if true) then A1 is equal to H2, if false then blank.

One way (formula in A1):

=if(or(A3=G1,A3=G2,A3=G3), H1,
if(or(A3=G4,A3=G5,A3=G6), H2, "")

Note: "" is not exactly "blank", if by "blank" you mean empty. That
is, ISBLANK(A1) will be false, but A1="" will be true.

I want this type of logic to extend from A1 to A5( so that if the cell A3
changes from G1 to G6 ( or function) then A1 to A5 changes to H1 to H4( or
function) automatically).

This requirement does not make sense to me. The above formulation
might not meet this requirement.
 
Back
Top