# Archive of Mr Excel Message Board

Back to Forms in Excel VBA archive index
Back to archive home

## How to Define Between Ranges for If Formula

Posted by Rodney on January 30, 2002 11:20 AM
Does anyone know how to define in between ranges for the IF Formula. For example: i am trying to tell the program to do a subtraction if the number in one cell is between x and y. Does anyone know how this can be done. I would appreciate your help. Thanks. Here's the formula that I am doing by the way.

=IF(G40<\$I\$13,I39-\$E\$32,IF(G40<\$I\$16,I39-\$E\$39,IF(G40=\$I\$16,\$I\$15, \$I\$15)))

 Check out our Excel Resources

## =IF(AND(A1X),do your subtraction here, do something else here)

Posted by Steve Hartman on January 30, 2002 11:24 AM

## Let's try again

Posted by Steve Hartman on January 30, 2002 11:26 AM
=IF(AND(A1>x,A1<y),do your subtraction here, do something else here)

## One more time

Posted by Steve Hartman on January 30, 2002 11:29 AM
=IF(AND(A1>x,A1<y),do your subtraction here,do something else here)

## One more time

Posted by Steve Hartman on January 30, 2002 11:30 AM
=IF(AND(A1>x,A1<y),here,do something else here)

## Steve, leave a space after the < sign [nt]

Posted by Mark W. on January 30, 2002 11:30 AM

## Steve -- Put a space before the less than symbol, whenever you need it. [NT]

Posted by Aladin Akyurek on January 30, 2002 11:31 AM

## last time?

Posted by Steve Hartman on January 30, 2002 11:31 AM

## LAST TIME!!!!

Posted by Steve Hartman on January 30, 2002 11:34 AM

## Are you sure? :)

Posted by Aladin Akyurek on January 30, 2002 11:35 AM

## One way or the other!

Posted by Steve Hartman on January 30, 2002 11:38 AM

This archive is from the original message board at www.MrExcel.com.