RE: IF/OR/AND function in a formula

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Rumy
This is what I got:
=IF(AND(SUM(A2:C2)=0,D2=0),E2-F2,IF(SUM(A2:C2)=0,D2,SUM(A2:C2)))

If I am reading the problem correctly,
Luke's formula is shorter and, therefore, more elegant, but it adds E and F,
rather than subtracting F from E.
With the following revision, I like Luke's better:
=IF(SUM(A2:C2)=0,IF(D2=0,E2-F2,D2),SUM(A2:C2))
The both test out the same.
M

"Rumy" wrote:

I have a unique scenario and need assiatance to create a formula.

I have dollar amounts in A,B,C,D,E,F columns. I need a result in G

it should be A+B+C. If A+B+C equals 0 the result should be D. If D also
equals 0 then the result should be E - F. Please help. Thanks.
.



Relevant Pages

  • Re: AWS Coding Styles (and about boring plain-linear text files in the end)
    ... because the process of reading is same. ... later, you have indent also. ... The length of words may make this process slower or shorter, ... There are differences in how chains of characters and chains of symbols are ...
    (comp.lang.ada)
  • Re: parsing a CSV line
    ... > quote text qualifier and backslashes. ... > was wondering if there might be a more elegant or shorter way: ...
    (comp.lang.lisp)
  • Re: AWS Coding Styles (and about boring plain-linear text files in the end)
    ... because the process of reading is same. ... compares program texts more often than newspaper texts. ... Formulae have always *shorter* lines than ... Deeply nested constructs is IMO bad style, ...
    (comp.lang.ada)
  • Re: OOP question about properties & methods
    ... Bruce One wrote: ... proceed when using properties (more elegant) vs returning values directly in ... then writing and subsequently reading gives the same ...
    (microsoft.public.dotnet.general)
  • Re: Reading Notes Question
    ... > If you skip learning this now, you will hit a brick wall in a shorter ... of cognition which apparently would prevent reading musical notation. ... brain for other purposes conveys an advantage for musicianship. ...
    (rec.music.makers.piano)