Link to home
Start Free TrialLog in
Avatar of RWayneH
RWayneHFlag for United States of America

asked on

Formula help

Why is the following formula not returning blank if not equal to any of the conditions?

=IF(H181=0,A181,IF(AND(F181=1,H181="LAM"),A181&$M$2,IF(AND(F181=2,H181="LAM"),A181&$M$3,IF(AND(F181=3,H181="LAM"),A181&$M$4))))
SOLUTION
Avatar of Naresh Patel
Naresh Patel
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Perhaps

=IF(H181="",A181,IF(AND(F181=1,H181="LAM"),A181&$M$2,IF(AND(F181=2,H181="LAM"),A181&$M$3,IF(AND(F181=3,H181="LAM"),A181&$M$4,""))))

Thanks
Actually 0 or "" excel consider both one and the same.
Avatar of RWayneH

ASKER

but I need it to do two different things.  If zero do this, if not, blank??  If "" and 0 are considered the same, how do I do this?
Change  Cell Format to Text - For References.
=IF(H181="0",A181,IF(AND(F181=1,H181="LAM"),A181&$M$2,IF(AND(F181=2,H181="LAM"),A181&$M$3,IF(AND(F181=3,H181="LAM"),A181&$M$4,""))))

Change Cell H181 to text Format
ASKER CERTIFIED SOLUTION
Avatar of Glenn Ray
Glenn Ray
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thumbs Up Mr.Glenn Ray....   :) :) :)

Thanks
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RWayneH

ASKER

EXCELent!!  All good solutions and worked great.  Thanks.