Can TRUE/FALSE be replaced by a formula?

  • Thread starter Thread starter BCB
  • Start date Start date
B

BCB

Hi


I was wondering if, given that the conditions (for a "1" or "TRUE") are
in place, say: A3>B3, wouldn't it be possible for Excel to return the
difference between A3 and B3 ("A3-B3"), for instance, or any other
cells' additions or subtractions for that matter?
It gets worse: instead of piling these returns in a column beside the A
and B columns, would it be possible to sum these conditional additions
in a single cell on top?

Hope someone knows the tricks and can help
Thanks in advance
bcb
 
should be fairly easy, but not sure if have all info need?:

=IF(A3>B3,A3-B3,"")
 
BCB said:
Hi


I was wondering if, given that the conditions (for a "1" or "TRUE") are
in place, say: A3>B3, wouldn't it be possible for Excel to return the
difference between A3 and B3 ("A3-B3"), for instance, or any other
cells' additions or subtractions for that matter?
It gets worse: instead of piling these returns in a column beside the A
and B columns, would it be possible to sum these conditional additions
in a single cell on top?

Hope someone knows the tricks and can help
Thanks in advance
bcb

Hi BCB,

If I understand you correct then I belive you can use something like
the SUMPRODUCT()

Maybe something along the lines of:

=SUMPRODUCT(--(A1:A10>B1:B10),A1:A10+B1:B10)


With your data in A1:A10 and B1:B10

The first argument will do the comparisson and the second the addition
(substraction if you put in - )

Regards,
Bondi
 
If I understand, try

=SUM(IF(A1:A10>B1:B10,A1:A10-B1:B10))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Thank you all

Will try them out, and hopefully tweak them to fit my other needs, o
eventually return with more specific questions.
Thanks
bc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top