Thread: Formula problem
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default Formula problem

It works for me, as expected.
It would be helpful if you told us what values where in E1, J1, J5 & J6 and
what result you got.

You could also use =J1+J5*(E1=1)+J6*(E1=2) but this will return the value in
J1 if E1 has any value other than 1 or 2

Do tell us more, we want to help
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme



"sunnydazy" wrote in message
...
I have an "either or" situation:
If cell E1 is 1 then add the entry in J1 to cell J5, or
If cell E1 is 2 then add the entry in J1 to cell J6
This solution was posted yesterday, but it didn't work.

=IF(E1=1,J1+J5,IF(E1=2,J1+J6,""))

Any suggestions would be greatly appreciated.
Thank you,
Sherry