How to create an IF, TRUE statement for a range?

lizsunnysideup

New Member
Joined
Jun 29, 2019
Messages
36
Hello. Was wondering if someone might help me with an If, TRUE statement for a range? I'd like the range to be 0-60. The other thing is that the lower value has to be equal to or greater than 0, and the higher value has to be less than or equal to 60.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Welcome to the forum.

Do you mean that you want to see if a cell's value is in that range? Then try:

=IF(AND(A1>=0,A1<=60),TRUE)

Or do you want to check every value in a range to see if all the values are are between 0 and 60? If so, try:

=IF(COUNTIF(A1:C10,"<0")+COUNTIF(A1:C10,">60")=0,TRUE)
 
Upvote 0
Do you mean that you want to see if a cell's value is in that range? Then try:

=IF(AND(A1>=0,A1<=60),TRUE)
It was the first one, and it worked! Thanks so much :)
If you are looking for an answer of TRUE or FALSE, you can eliminate the IF function call like this...

=AND(A1>=0,A1<=60)

There is another construction available...

=ABS(A1-30)<=30

but I am guessing you would find the first one's logic easier to follow.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top