Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can someone please help?

I am using the IF function to find cells within certain ranges, but want the cell to contain the value if it falls within that specific range.

for example: =IF (AA3 is between 150 and 400 then AD3 is equal to AA3 and if not leave blank)

my current formula below does not work: =IF(AND(AA3>150, AA3<400), AD3=AA3, "" )

where AD3 is the cell I am working in...

any suggestions?

share|improve this question
up vote 2 down vote accepted

This is the formula for cell AD3:

=IF(AND(aA3>150, aA3<400), aA3, "" )

With spreadsheets, the value that ends up in the cell is either part of the IF, the true or false. There is no need to assign the value to the cell, it is the result of the formula.

share|improve this answer
Thank you Paul! Elegant and works like a charm! – geoconfusion Jun 26 '12 at 10:00
make sure if you want 150 and 400 to be included in the possible values between 150-400 that you change it to >=150 and <=400 – datatoo Jun 28 '12 at 3:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.