Results 1 to 5 of 5
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Adding Back Certain Numbers (2003)

    Column A contains 150 rows of data, that is totaled at Row 151. At Row 152, I would like to add back 3 pieces of data to the total in A151, say the data located at A3, A39, and A77, but only if they are positive (they don't all have to be positive, if one or two or all three are, so be it). Is there a formula for this?
    Thanks in advance.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Adding Back Certain Numbers (2003)

    I don't understand what you want or why you want it, but the literal translation of your description into a formula is

    =A151+IF(OR(A3>0,A39>0,A77>0),A3+A39+A77,0)

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Adding Back Certain Numbers (2003)

    Hans,
    Thanks for your reply. Unfortunately, I can't seem to get this thing to work. The way I am reading your formula is that if either/or any of the three numbers are positive, you add all three, regardless if one or two may be zero or negative. That isn't quite what I was looking for. What I am looking for is to add back only the positive numbers of the three. For example, if A3 were positive, and A39 and A77 negative, only A3 would be added back; similarily, if A3 and A39 positive, they would both be added back, but not A77.
    I hope this clears it up!
    Thanks again.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Adding Back Certain Numbers (2003)

    That's not how I read your original question. Try this:

    =A151+MAX(A3,0)+MAX(A39,0)+MAX(A77,0)

  5. #5
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Adding Back Certain Numbers (2003)

    Thanks, Hans, sorry for the confusion.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •