# MS Excel Help -- Saturation Points ?!

by ko_kidd
Tags: excel, points, saturation
 P: 21 Does anyone know how to do this with if-then statements or something else? For example: I want to analyze inflow and outflow in a tank, when the volume reaches zero then it's empty of course--so I shouldn't have a negative volume after this, volume should just be zero until I can finally get a large enough inflow. Say I'm doing this in minutes.
 Mentor P: 37,654 Sounds like the floor function in Excel would do what you want. Try help floor.
Mentor
P: 37,654
 Quote by berkeman Sounds like the floor function in Excel would do what you want. Try help floor.
Oops, no. Foor is different. Using an IF statement would probably be best.

Mentor
P: 37,654

## MS Excel Help -- Saturation Points ?!

 Quote by Excel Help =IF(logical_test,value_if_true,value_if_false)

So use =IF(cell_reference < 0, 0, cell_reference)

Here are two columns of numbers: The first is just the numbers, and the second column uses the above equation in each cell, with the cell_reference equal to the cell to its left. Just use control-d to pull the first cell equation down to all the cells in the right column to get the calculations done.

10	10
9	9
8	8
7	7
6	6
5	5
4	4
3	3
2	2
1	1
0	0
-1	0
-2	0
-3	0
-4	0
-5	0
-6	0
 Sci Advisor P: 5,096 I'm not sure what your volume calcs look like, but a standard IF() function in Excel would look like: IF(A1>0,ENTER CALC HERE,0) where A1 is the cell that would display the tank volume.
 PF Patron Sci Advisor P: 2,283 You have to use VBA in Excel to use the full IF-THEN-ELSE statement. IF dummy > 10 THEN msgbox "dummy is greater than 10" ELSE msgbox "dummy is less than or equal to 10" END IF I'm not sure what you are asking about the rest of the question.
 Mentor P: 21,662 No, the excel command contains the "else". It's the 3rd term in Fred's statement. Also, my read of the question says that both the first and second terms should be the equation - first as an argument, then as an output. Ie: =if([your function]>0,[your function],0) But it is tough to know for sure without getting more specifics of the problem.
PF Patron