# Airplane weight and balance

#### JoeNichols

##### New Member
I'm trying to write a formula for a aircraft weight and balance. The rear arm limit remains constant, but the forward limit shifts after reaching a certain weight.

EX: Weight up to 2050 forward limit is 82.0 and rear limit is 93.0. Weights between 2050 and 2550 the forward limit shifts aft at a constant rate from 82.0 to 88.6 while the rear limit remains at 93.0

I've started with this formula:
=IF(B30<=2050,"82.0",IF(B30>2050,(B30-2050)*0.0132+82))

This formula works but if the weight in B30 exceeds 2550 it will continue to shift the forward limit aft past 88.6.

I tried adding this to the formula:
=IF(B30<=2050,"82.0",IF(AND(B30>2050,B30<=2550),(B30-2050)*0.0132+82))

If the weight is over 2550, the cell shows "FALSE".

I tried:
=IF(B30<=2050,"82.0",IF(AND(B30>2050,B30<=2550),(B30-2050)*0.0132+82),IF(B30>2550,"88.6"))

But is says too many arguments for this function and I don't know excel well enough to troubleshoot the formula.

____________________

My goal is that if the weight is over 2550 the forward limit will continue to show 88.6. It will stop shifting aft and not show false.

### Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

#### MickG

##### MrExcel MVP
Perhaps:-
Code:
``=IF(B30<2050,"82.0",IF(B30>2550,"88.6",IF(AND(B30>2050,B30<=2550),(B30-2050)*0.0132+82)))``

#### Rick Rothstein

##### MrExcel MVP
I am pretty sure that this formula will do what you want...

=MAX(82,MIN(88.6,(B30-2050)*0.0132+82))

Last edited:

#### JoeNichols

##### New Member
Thanks Mike. Your formula worked but showed an error. When testing it would sometimes show a forward and aft exceedance at the same time. I appreciate your help, thank you.

#### JoeNichols

##### New Member
Thanks Rick. That was simple and perfect. Thank you for your help.

#### JoeNichols

##### New Member
Are either of you are interested in another challenge? How can I change the text color (ex; a green "OK" to a red "EXCEEDED")? I don't want the cell background to change color as these may need to be printed and would make them difficult to read.