Discussion Locked

excel-calculate cells between two values

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
what formula do I use when e.g. I have 2 columns - column A have random numbers between 1 and 30, column B have also random numbers between 1 and 100. I want excel to search in column A for numbers greater than or equal to 5 BUT less than or equal to 20. If found it must add the numbers in column B.

1 reply

by pubservant

If I understand you correctly, the following formula will work.
=IF(AND(A2>=5,A2<=20),A2+B2,)

It will add the value in column A to the value in column B if the value in column A is greater than or equal to 5 and less than and equal to 20.

This discussion is closed to new replies.