Can I be able to do this?

T

transkawa

Hello. I want to carry out a conditional calculation using IF function
such that it the logical test on IF function returns true or false I can
be able to insert new value into one of two alternative cells.
Like, I have two ranges to sum, range A and range B. If range A if
greater than B, I do a subtraction operation and insert the value into
cell A10 but if range A is lesser than range B, I still do a subtraction
operation but this time insert the value into a different cell, cell
B10.
Can anyone show me how?
 
P

Pete_UK

Put this in A10:

=IF(SUM(rangeA)>=SUM(rangeB),your_subtraction,"")

and this in B10:

=IF(SUM(rangeA)>=SUM(rangeB),"",your_subtraction)

Hope this helps.

Pete
 

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

Top